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

1 Like

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

5 Likes

Two methods:

For instant death: humanoid.Died

For triggering after the character is removed: player.CharacterRemoving

2 Likes