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

How do you switch teams on death?

Asked by 10 years ago

I am very nooby at scripting. I don't know how to script at all. I would like to know how to force switch a team on death.

1 answer

Log in to vote
2
Answered by 10 years ago
game.Players.PlayerAdded:connect(function(Player) -- Player Added Event
    Player.CharacterAdded:connect(function(Character) -- Character Added Event
        Character.Humanoid.Died:connect(function(Death) -- OnPlayerDied
            Player.TeamColor = BrickColor.new("Really red") -- or whatever team you wish for it to change to
        end)
    end)
end)
Ad

Answer this question