I've tested this piece of script with 5 players in a local server and they keeping getting on the same team while I want them to be even and randomized. Here's a fragment of my script:
local teams = {"Maroon","Institutional white"}
local players= game.Players:GetChildren()
local randomteam= math.random(1,#teams)
for i,v in pairs(teams) do
if randomteam==i then
for u,d in pairs(players) do
d.TeamColor= BrickColor.new(v)
end
end
end
They end up all in Maroon and I want some to be at Institutional White.
