I'm trying to randomly select a percentage of players to be in one team. I want 20% of the people to randomly be selected for the Red team, 60% to be selected for the Green team, and 10% to be selected for the Blue team.
This is what I have so far, does it work?
players = game.Players:GetChildren()
redpercentage = math.floor(#players * 0.2)
redteam = math.random(redpercentage, players)
greenpercentage = math.floor(#players * 0.6)
greenteam = math.random(greenpercentage, players)
bluepercentage = math.floor(#players * 0.1)
blueteam = math.random(bluepercentage, players)
Also, how could I, persay, select them, so that I could set their team color, give them certain Guis, and give them certain tools, based on their selected color?

2 comments
Whoops just realised you wanted precentages...
Fixed it... I think it would work... (I hope) 0.0