So I wana make a script that picks a sertain number of people from the entire server to become part of one team and the others to be on another, But also to have the Team Names on the leaderboard. Any ideas how I would go about doing this, Thanks in advance.
COMMUNITY QUESTION
How do I make a team splitter?
1 answer
players = game.Players:GetChildren() -- gets current players
randomp = players[math.random(#players)] -- picks random player
print(randomp.Name .. " is it") -- tells us who the random player is
--stuff for it player or random
for i,v in pairs(players) do -- iterate the player table
if v.Name ~= randomp.Name then -- whoever isn't 'it', will tell us who isn't
print(v.Name .. " is not it") -- tells us who
--stuff if not it
end
end
This discussion is preserved as it was. New answers, comments, and votes are closed.
