Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

How do you change ones team?

Asked by 11 years ago

I am quite confused here, I am playing around with teams. I do not know what to do to make someone in a team, with this script

1a = Instance.new("Team",  game:GetService'Teams')
2a.Name = "TeamExample"
3a.TeamColor = BrickColor.Random()

1 answer

Log in to vote
2
Answered by 11 years ago
1local a = Instance.new("Team",  game:GetService'Teams')
2a.Name = "TeamExample"
3local newTeamColor = BrickColor.Random()
4a.TeamColor = newTeamColor
5--Edit the following for your own needs
6Game.Players.PlayerAdded:connect(function(plr)
7    plr.TeamColor = newTeamColor
8end)
Ad

Answer this question