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

How do I make a script run After the player dies?

Asked by 8 years ago

I have this script

game.Players.PlayerAdded:connect(function(player)
    while not player.Character do wait() end
    local character = player.Character
    local animateScript = character.Animate
    animateScript.idle.Animation1.AnimationId = 'http://www.roblox.com/asset/?id=277780651'
end)

When I join, it works. After I die, it completely stops working. How do I make it work After Death?

0
game.Players.CharacterAdded instead. PlayerAdded is only when the player joins. CharacterAdded is when the character gets respawned or added Nickoakz 231 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

A Theory For This Is...

The onDiedEvent, this occurs when the player dies, I believe that if you use a while true do loop, then whenever they die, you can insert the code to have it played. I have no idea on how this would look, but you should look up more info on the onDiedEvent here.

GreekGodOfMLG

Ad

Answer this question