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 10 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

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

1 answer

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

Answer this question