Died (Event)
From Legacy Roblox Wiki
Description
The Died event is triggered when Humanoid "dies" either because Health is 0 or because the Head and Torso are disconnected (Broken joints or one or both is removed). You can prevent deaths through depleted health by keeping your health constantly above 0.
The event occurs after the automatic BreakJoints in model upon death, but before character falls and is removed.
Example
local function onDied(character) --do on death end local function onCharacterAdded(character) character.Humanoid.Died:connect(function() onDied(character) end) end local function onPlayerAdded(player) player.CharacterAdded:connect(onCharacterAdded) end game.Players.PlayerAdded:connect(onPlayerAdded)