Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make a player change a team with a script?

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.

1 answer

✓ Accepted answer

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!

1 comment

0

Thanks! It works now :)

This discussion is preserved as it was. New answers, comments, and votes are closed.