Stop Player Characters spawning on Dedicated Server

Hi Everyone,

I’m testing my game with the integrated Dedicated Server option. The only problem I’m having is that a Player Character is being spawned on the Dedicated Server instance. So if I run with a dedicated server and 2 clients, I get 3 Player Characters when I’m wanting only 2.

How do I correct this? Thanks all!

Use “Switch Has Authority” wherever you are spawning your character. The Switch function branches into “Authority” and “Remote”.

Since you want to spawn only on clients, you’ll need to use the “Remote” branch to spawn your character.

Looking at my project, it seems I don’t manually spawn the player character because it is in my World Outliner.

I guess I need to delete it from there and spawn it, but where would be the best place and method to spawn the player character then?

You can do that in your Level Blueprint https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/SpawnAndDestroyActors/Blueprints/index.html

Alternately you can create a new dummy Blueprint that simply spawns your character, and then place an instance of this blueprint in your map.

Thanks vivgem!

@anonymous_user_25793a83 Hey, Please let me know how i can spawn player character in dedicated server i am using blueprint… Kindly Helppp!!!