Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I can't seem to make all the player's teams to change, help?

i tried to make all the player's team change after 15 seconds but it keeps giving me errors and i dont know how to fix it :( my code:

wait(15)
game.Players.TeamColor = TeamColor.new("Medium stone grey")

1 answer

I believe you have to set the team for each player individually. Try using

for key, object in ipairs(game.Players:GetPlayers()) do
	object.TeamColor = TeamColor.new("Medium stone grey")
end

However, this will still throw an error because TeamColor is set using BrickColor

So the proper code would be something like this

for key, object in ipairs(game.Players:GetPlayers()) do
	object.TeamColor = BrickColor.new("Medium stone grey")
end

1 comment

0

I'm just throwing out there that I never could set a players team by the TeamColor, only by setting the actual team.

This discussion is preserved as it was. New answers, comments, and votes are closed.