local plrs = game.Players:GetPlayers()
plrs.TeamColor = BrickColor.new("Medium red")
✓ ANSWER ACCEPTED
How do I make a "Change all players team" script??
1 answer
✓ Accepted answer
plrs points to a table.
The plrs variable points to a table. All you are doing is adding a TeamColor field into the table.
What you want to do is traverse the table, so you can get a reference to a player one at a time, via a generic for loop.
for _, player in ipairs(players) do -- pls change plrs to players in your script it's more readable
player.TeamColor = BrickColor.new("Medium red")
end
I hope I helped, and if I did, don't forget to hit that "Accept Answer" button below. This will really help me and you out.
This discussion is preserved as it was. New answers, comments, and votes are closed.
