Client is kicked when loading stream levels in local multiplayer

Hi everyone,

I’m a junior developer and new to multiplayer, so unfortunately I only have a really vague description of the issue because I still haven’t found the exact problem, and I’m actually hoping that someone can explain to me in principle whether things work the way I have in mind. But I tried my best:

I have built a VR local multiplayer application. There is a listening server (runs via a laptop, but because it is a listening server it is also a client if I have understood correctly) and clients, which are the players with the VR glasses. There are 5 islands in the application to which the players can travel by boat. These islands exist as stream levels. On the boat routes there are instances of the Blueprint Actor BP_Cloud, which consists of a cloud particle system (for the looks) and a Box Collider. In this actor, the collision with the boats is checked (boats and not the players themselves, because the players move around a lot and therefore there were sometimes difficulties with getting in and out of the collider). If there is a player on the colliding boat (each boat has a variable for this), the function “Load Island” is called on the respective pawn, in which the stream level for the island is loaded. Originally I didn’t set this function to replicated, because the island should only be loaded for the client who is currently on the way to it. Not for all other clients. However, the pawn blueprint itself is obviously replicated so that the clients can see each other and their movements (can this already lead to problems?). In itself, however, this works if 1 client is alone in the session.
If a second client joins the session, there have now been several occasions where a player with a boat passes through the collider and them or the other client is disconnected from the server. There is no error message or anything similar in the output logs as to why the client was kicked. I have read that this is a cheat protection and that you should load the levels on the server once beforehand. How can I load the levels only on the server so that they are not replicated to the clients though? I tried this with the Has Authority Switch both in the level blueprint and in the player spawn, but it didn’t work and the loaded islands were replicated.
I also tried to call the “Load Island” function first as a run on server function, where I load the island without making it visible, and then passed it on to a run on owning client function, which then loads the island visibly. But then I can no longer unload it from the server without it also being unloaded at the clients (because servercall duh).

Is there another way to run things on the server only? Or probably a more sensible way than mine? Does anyone have any experience with this?

I have tried to make a few meaningful code screenshots. The first is the player pawn, the second is the cloud actor containing the collider. Please ignore the wild print messages, I tried to understand what is happening. Oh, and also the boat is a swan? So it’s called BP_Swan in game, but that’s the boat I’m talking about :sweat_smile: