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

How would I be able to even the number of people on a team?

Asked by 10 years ago

How can I be able to have a(n) even number of people on 2 different teams? or at least 1 person off?? I'm not sure how the code would work.

2 answers

Log in to vote
5
Answered by
1waffle1 2908 Trusted Badge of Merit Moderation Voter Community Moderator
10 years ago
local colors={"Bright blue","Bright red"}
for i,v in ipairs(game.Players:GetPlayers())do
    v.TeamColor=BrickColor.new(colors[(i-1)%#colors+1])
end

Each player in the game will have their teamcolor set to the corresponding index in the table of colors that matches or loops around to match their index in Players.

Ad
Log in to vote
-1
Answered by 10 years ago

Or you could go into the Roblox Studio > Explorer > Teams > Properties > Even Teams Thingy

Sorry this may not be to accurate I haven't seen the new studio and haven't made an even team spawn yet so..Yeah there you have it.

Answer this question