Why does an extra player character spawn in multiplayer?

I have a lobby system in which when all players ready up they seamless travel to another level where the characters spawn. For some reason anytime the server is not the last one to ready up it will spawn an extra character (who is obviously not possed)


This is the code inside the controller

this is the start game inside the game mode

Do you think its due to the ready-up system, wether the code is being run in the controller, or something else?

Hey @Bradjoe1!

I’m not an extremely well-versed individual when it comes to online multiplayer, so I’m hoping that someone else has some ideas. But I will say that first you need to know everything you can about the problem before you come up with an answer! To that end- is there a way you could differentiate the characters so you could determine if it’s creating a copy of the host’s character or a client’s character? That could lead you closer to the solution!

Is this a Listen Server lobby setup? As in is a Player hosting the Lobby?

Is the Server being connected to a Listen Server… Same Hosting client?

Yes this is a listen server, the players host.

I wonder if there’s something going on where the client is joining faster than the server and when the server joins it overrides this leaving behind the old client’s character forcing them to create and posses another.

How are you handling spawning in the GM for the new map?

heres how i spawn the players, its in the controller


and this is on the game mode (a separate gm from the lobby one)

The GM by default spawns and possesses a pawn immediately on connection. You have to overwrite this behavior, or allow it to happen then loop through and destroy the default and spawn a custom.

See the following thread.

1 Like

What would be the best way to do this in my case?
I have already set the default pawn class in my game mode to (none)
It also doesn’t explain why it works when the server is the last to ready up. I even created a different system to test this. A force start button on a widget that when pressed by the server starts the game - everything loads normally and correctly.