Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Team Assigning help?

Asked by
iLegitus 130
9 years ago

So ive got no idea on how to do this,But the idea is simple,Each time the function is ran,All of the players which are currently ingame,Are split evenly into teams.

function ChoseTEAMS()
    for i,v in pairs(Game.Players:GetPlayers()) do 
    pcall(function() 
    v.TeamColor = "Really Red"
    wait(0.03*4)
    end) 
end

As i said,I am really bad with the team stuff. I dont really use teams often.

1 answer

Log in to vote
0
Answered by 9 years ago

You dont need pcall on this.

function CHOOSETEAMS()
for _, v in pairs(game.Players:GetPlayers()) do
v.TeamColor=BrickColor.new("Really red")
wait(0.03/4)
end
end
Ad

Answer this question