Okay, so I'm making a game where I want all players to be put in a team, and after they die they go back into the lobby. (Neutral, if I have to make another team for the dead that's ok.)
So, how would I put all current players into one team?
Would I grab all the players and then add something like TeamColor == "Medium stone grey"
?
Please help.
To place more information in Hungryjaffer's answer, Use the pairs
function to access all of the players, the pairs function iterates through the Players container making it all one value.
for _,players in pairs(game.Players:GetPlayers()) do players.TeamColor = BrickColor.new("Medium stone grey") end
for _,v in pairs (game.Players:GetPlayers()) do -- Get all players v.TeamColor = BrickColor.new("Medium stone grey") -- Change all their teams to Medium Stone Grey end -- Ending.