How can I detect if the player is dead

You can use Humanoid.Died for that (an event).

If it’s for something simple, I’d recommend using:

Humanoid.Died:Wait()
4 Likes