CharacterRemoving (Event)

From Legacy Roblox Wiki
Jump to navigationJump to search
CharacterRemoving ( Model character )
Description Fired when a character is about to be removed.
Member of: Player

This event fires when the player's character is removed, which happens right after they die.

Example
--note, these functions are anonymous
game.Players.PlayerAdded:connect(function(player)
  player.CharacterRemoving:connect(function(character)
    print(character.Name .. " has died.")
  end)
end)