Help with multiplayer

Godot Version

Godot 4.2.1


I have been following a tutorial specifically this one, but when the client joins, a player doesnt get instantiated for the client, but does for the server, and yes I have both a MultiplayerSpawner set up to spawn the player scene, and a MultiplayerSychronizer

One problem the video runs into is that, on the client, both server and host player instances are being controlled at the same time. So they end up being superimposed onto each other.

Did you do the next step guarding logic with is multiplayer authority?

Also have you confirmed the instance is missing in the remote tree view while games are running?

Are there any errors reporting in the debug tab of the editor?

There’s no errors and players have the authority system in place so the other player kind of just floats there, I checked the remote tree view both players are spawned in on the server but for the client, there’s no players at all

Is the root node for the multiplayer spawner the same on both client and server? I’m guessing it is since you said there were no errors. Also the player scene needs to be available on both client and server for it to be instanced. It might just be broken on your client. Just to say you should look for possible issues outside of the multiplayer spawner.

Yep MultiplayerSpawner has the same root. how might the player scene not me available on the client?

Do you have a preferred git repository platform (GitHub, bitbucket, git lab) or some other means to share your project?

I’m not really sure what it could be, my guess if there isn’t an error and the client isn’t syncing then there probably is some bug in the current logic that is leading to the client not connecting… But I have delt with some finiky things in Godot’s multiplayer code before so I can’t say for sure.

I use github, you can find my project here: The Project
it will be changed later

func add_player(peer_id):
	var player = Player.instantiate() = str(peer_id)


[node name="MultiplayerSpawner" type="MultiplayerSpawner" parent="."]
_spawnable_scenes = PackedStringArray("res://Assets/Entities/player.tscn")
spawn_path = NodePath("../Multiplayer")

[node name="Multiplayer" type="CanvasLayer" parent="."]

One problem I found is that you are not adding the player to the watched node in the debug_world scene.

You are adding node to debug_world root, and the MultiplayerSpawner is watching the “Multiplayer”, CanvasLayer node.

It should be $Multiplayer.add_child(player)

Oh okay ill change that and see, thanks a ton dude!