PlayerRemoving (Event): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Camoy Format/example |
>Camoy It is AFTER, a mistake started by Anaminus |
||
Line 1: | Line 1: | ||
{| | {| | ||
|<onlyinclude>{{Event|name = PlayerRemoving | |<onlyinclude>{{Event|name = PlayerRemoving | ||
|arguments = [[ | |arguments = [[Player]] ''player'' | ||
|description = Fired | |description = Fired right before the player leaves the game. | ||
|object = [[Players]] | |object = [[Players]] | ||
|}}</onlyinclude> | |}}</onlyinclude> | ||
|} | |} | ||
{{Example| | {{Example|<pre> | ||
<pre> | |||
local function onPlayerLeaving(Player) | local function onPlayerLeaving(Player) | ||
print(Player.Name.." | print(Player.Name.." is leaving the game!") | ||
end | end | ||
game.Players.PlayerRemoving:connect(onPlayerLeaving) | game.Players.PlayerRemoving:connect(onPlayerLeaving) | ||
</pre>}} | </pre>}} |
Revision as of 18:06, 29 August 2010
|
Example
local function onPlayerLeaving(Player) print(Player.Name.." is leaving the game!") end game.Players.PlayerRemoving:connect(onPlayerLeaving)