I am making a game where the players can pick their teams, but theres a problem. All the players can just go on one team. What can I do to make the teams even and stop everyone from just joining one team.
local function countTeams( player )
local rteam = 0
local bteam = 0
local neutral = 0
for k,v in pairs(game.Players:GetChildren()) do
if v ~= player then
if v.Neutral then
neutral = neutral + 1
elseif v.TeamColor == teamRed then
rteam = rteam + 1
elseif v.TeamColor == teamBlue then
bteam = bteam + 1
else
neutral = neutral + 1
end
end
end
return rteam, bteam, neutral
end

1 comment
Why the hell did people rate this down, what a holes