PlayerRemoving (Event): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Camoy
Fixed formatting
>Camoy
Format/example
Line 1: Line 1:
{{CatUp|Events}}
{|
{|
|<onlyinclude>{{Event|name=PlayerRemoving
|<onlyinclude>{{Event|name = PlayerRemoving
|arguments=[[Instance]] ''Player''
|arguments = [[Instance]] ''player''
|description= Fired after a player leaves the game.
|description = Fired after a player leaves the game.
|object= [[RBX.lua.Players (Service)|Players]]
|object = [[Players]]
|}}</onlyinclude>
|}}</onlyinclude>
|}
|}
{{Example|
{{Example|
<pre>function onPlayerLeaving(Player)
<pre>
print(Player.Name .. " has left the game!")
local function onPlayerLeaving(Player)
  print(Player.Name.." has left the game!")
end
end


game.Players.PlayerRemoving:connect(onPlayerLeaving)</pre>}}
game.Players.PlayerRemoving:connect(onPlayerLeaving)
</pre>}}

Revision as of 15:58, 29 August 2010

PlayerRemoving ( Instance player )
Description Fired after a player leaves the game.
Member of: [[RBX.lua.Players (Object)|Players]]
Example
local function onPlayerLeaving(Player)
  print(Player.Name.." has left the game!")
end

game.Players.PlayerRemoving:connect(onPlayerLeaving)