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

How do you split teams evenly?

I've been working on this script;

        local T1 = instance.new("Team",Teams)
	T1.TeamColor = "Bright blue"
	wait(0.1)
	local T2 = instance.new("Team",Teams)
	T2.TeamColor = "Bright red"
	-- Work in progress...

There's more to it, but that's as far as I got. To when it creates teams. Alright, now what I'm asking might not be "Simple", but it's just a question on how to split players up into 2 teams blue, and red from the spectating team?

1 comment

0

I'm not sure if I understand you correctly but you could also make the spectating team not auto- assignable

1 answer

✓ Accepted answer
function Even()
	GetMembers = game.Players:GetChildren()
	Number = 0
	for i=1, #GetMembers do
		Number = Number + 1
		if Number > #Teams then Number = 1 end
		GetMembers[i].TeamColor = Teams[Number].TeamColor
	end
end
game.Players.ChildAdded:connect(Even)
game.Players.ChildRemoved:connect(Even)

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