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

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

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

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.

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.

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