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

What's the problem with this teaming script?

Asked by
Irvene 5
10 years ago

This function is supposed to team players, in a gamescript, but it's not doing anything, the gamescript just skips it.

function teams()
team1 = "Bright red"
team2 = "Bright blue" 

t1=0
t2=0
for i,v in pairs (game.Players:GetChildren()) do
if t1 < t2 then
t1 = t1+1
v.TeamColor = BrickColor.new(team1)
else
t2 = t2+1
v.TeamColor = BrickColor.new(team2)
end
end
end

Answer this question