How to trigger a function when a player dies

Hi all
i want to make a script in which when a player dies a function is triggered so how do i do that

The Humanoid.Died event documentation contains an example that could be useful.


Two methods:

For instant death: humanoid.Died

For triggering after the character is removed: player.CharacterRemoving

1 Like