-How do i change the team of everyone in my game server from blue to red -How do i make it so that when the player dies then he changes back to blue team
COMMUNITY QUESTION
How do i execute a change team script?
1 answer
You are going to have to set the AutoAssignable for blue to false.
function MoveToBlue()
for _,Player in pairs(Game.Players:GetPlayers()) do
--Looping through all players
Player.TeamColor = BrickColor.new("Bright blue")
--Change Team color
Player.CharacterAdded:wait() --Make sure they are alive first
Player.Character.Humanoid.Died:connect(function()
--When they die
Player.TeamColor = BrickColor.new("Bright red")
--Change back to red
end)
end
end
MoveToBlue()
This discussion is preserved as it was. New answers, comments, and votes are closed.

5 comments
i want them to all change team at a certain point in the game
Oh sorry thanks it works
gave me red squigily lines
Doesnt work
Updated