I'm using PlayerAdded to set certain Players' teams when they join the game. Group members join one team, etc, etc. However, I am not spawning in the correct position when I first join the game, but I spawn correctly after resetting.
SpawnLocations and Teams are set up correctly. No spawns are neutral and no teams are auto assignable.
I believe it is because I am spawning before the script is able to set my team. So is there any way to fix that?
It's most likely that the Players Character is spawning before the PlayerAdded code can actually run.
To get around this you could do the following code:
game:GetService("Players").PlayerAdded:Connect(function(Player) Player.CharacterAdded:Connect(function(Character) --you'd put any code relevant to the character here --it's good practice to put the character relevant code before the player relevant code end Player:LoadCharacter() --they'll spawn again at the new location end)