of     1   

tweetytime
#59904253Wednesday, December 21, 2011 1:50 AM GMT

-- Every players starts on the Grey Team. In otherwords the not playing team. I need this to randomly yet evenly divide the players on the grey team and put them on a "Bright blue" , and "Bright red" team if you make it work ill give 500 rs if you want it. function Divide_Teams() math.random(1,2) player = game.Players:GetChildren() for i = 1, #player do if (player[i] ~= nil) then if math.random = 1 then player[i].TeamColor.new = BrickColor.new("Bright blue") if else player[i].TeamColor.new = BrickColor.new("Bright red") end end end
zankonator1Alt
#59904387Wednesday, December 21, 2011 1:52 AM GMT

There is a Randomize teams funtion, but I'm not exactley sure what it is. Might be like funtion RandomizeTeams() or sumthin.
Spectrumw
#59904566Wednesday, December 21, 2011 1:54 AM GMT

function Divide_Teams()   local Ply = game.Players:GetPlayers()   local Turn = 0   while #Ply > 0 do     local n = math.random(#Ply)     Ply[n].TeamColor = BrickColor.new((Turn == 0) and 'Bright blue' or 'Bright red')     table.remove(n)     Turn = (Turn == 0) and 1 or 0   end end That should do it.
smurf279
#59904784Wednesday, December 21, 2011 1:56 AM GMT

Or just sort players into 2 different tables as they enter the game. . .

    of     1