CharacterRemoving (Event): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Emess
categorizing
>Merlin11188
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{|
{|style="width:100%;"
|<onlyinclude>{{Event|name = CharacterRemoving
|<onlyinclude>{{Event|name = CharacterRemoving
|arguments = [[Model]] ''character''
|arguments = [[Model]] ''character''
Line 6: Line 6:
|}}</onlyinclude>
|}}</onlyinclude>
|}
|}
This event fires when the player's character is removed, which happens right after they die.
{{Example|<pre>
{{Example|<pre>
--note, these functions are anonymous
--note, these functions are anonymous

Latest revision as of 23:12, 18 July 2011

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)