I want to make players get randomly assigned to teams. I have one script for this, but its not really that good. Is there a better way to do this? Here is my script:
local assign = 1
for i,v in pairs(game.Players:GetChildren()) do
if assign = 1 then
assign = 2
v.Team.BrickColor = BrickColor.new("Black")
else
assign = 1
v.Team.BrickColor = BrickColor.new("White")
end

5 comments
-1 for not having an explanation at all.
BOI! I took his code and the only difference is the math.random function!
you are being abusive
Ill give you plus I dom:).
Thank you, and if you don't understand, just say it now so I can edit.