So I have a script that would randomly assign players to teams:
local team1 = game.Teams.Yellow
local team2 = game.Teams.Blue
for _, player in pairs(game.Players:GetPlayers()) do
math.randomseed(tick())
local team = math.random(1,2)
if team == 1 then
player.Team = team1
elseif team == 2 then
player.team = team2
end
end
How would I change this script so that it assigns ONLY ONE player to a certain team and then assign the rest to the other team?
