PlayerRemoving (Event): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Emess
No edit summary
>SCARFACIAL
No edit summary
Line 1: Line 1:
{|
<onlyinclude>{{Event|name = PlayerRemoving
|<onlyinclude>{{Event|name = PlayerRemoving
|arguments = [[Player]] ''player''
|arguments = [[Player]] ''player''
|description = Fired right before the player leaves the game.
|description = Fired right before the player leaves the game.
|object = Players
|object = Players
|}}</onlyinclude>
}}</onlyinclude>
|}
 
{{clear floats}}
 
{{Example|<pre>
{{Example|<pre>
local function onPlayerLeaving(Player)
local function onPlayerLeaving(Player)
Line 13: Line 14:
game.Players.PlayerRemoving:connect(onPlayerLeaving)
game.Players.PlayerRemoving:connect(onPlayerLeaving)
</pre>}}
</pre>}}
[[Category:Events]]

Revision as of 21:33, 22 July 2011

PlayerRemoving ( Player player )
Description Fired right before the player leaves the game.
Member of: Players


Example
local function onPlayerLeaving(Player)
  print(Player.Name.." is leaving the game!")
end

game.Players.PlayerRemoving:connect(onPlayerLeaving)