In my game, I have set up a multiplayer lobby system where players join a room, chat with each other, and when the host is ready, can start the MP game for everyone to play. The way I have the game set up, is that depending on how many people are logged into the game, different characters are either created or deleted. The characters are the same, just wearing different colored shirts. I want it so that when the game starts, everyone will be assigned a character with a different colored shirt. While I've managed to set it up perfectly fine with only 2 people playing in the multiplayer game, 3 or 4 players does not work.
The first and second player will connect like normal, but when the third player tries to get into the game, they will find their character floating in the air, with hitbox viewable, unable to move or do anything. The same will happen if a 4th player is in the room, the 3rd and 4th character just float in the air, motionless. Their names will also not appear.
Is there any way I can fix this? Due to my low rep, I can't post links yet (kind of stupid, tbh) so just fix up the link. Here are links to photos of my code and the problem I have.