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

Whats wrong with this?

Asked by 10 years ago
 function doTeam()
local playerDir = game.Players:GetPlayers();
local chosen = table.remove(playerDir, math.random(1, #playerDir)); 
chosen.TeamColor = game.Teams["Bright red Team"].TeamColor;

for index,value in next, playerDir do
value.TeamColor = game.Teams["Bright blue Team"].TeamColor;
end

end

while wait(7) do
doTeam()
end

Answer this question