I'm trying to make a script that when a player dies he changes from the "Survivors" team to the "Lobby" team. I have been trying for a while now but I can't seem to get it right. I know how to implement a script that checks if the humanoid (from the player) is dead, but I could use some help to make the player also change team.
First thing first, make sure to post the code that you're having problems with.
Besides that, to change teams of a player, you have to change their TeamColor
property located in the Player.
This should do the trick:
game.Players["PlayerNameHere"].TeamColor = BrickColor.new("TeamColor")
If you have any problems, be sure to comment and we'll work it out together!