PlayerRemoving (Event): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>JulienDethurens
No edit summary
>SCARFACIAL
This had PlayerAdded in the example rather than PlayerRemoving
Line 10: Line 10:
This code will print <samp>A player has left: </samp>, followed by the player's name, everytime a player leaves:
This code will print <samp>A player has left: </samp>, followed by the player's name, everytime a player leaves:
<code lua>
<code lua>
game.Players.PlayerAdded:connect(function(player)
game.Players.PlayerRemoving:connect(function(player)
print("A player has left: " .. player.Name)
print("A player has left: " .. player.Name)
end)
end)

Revision as of 02:24, 2 March 2012

PlayerRemoving ( Player player )
Description Fires when a player is leaving the game.
Member of: Players


Example

This code will print A player has left: , followed by the player's name, everytime a player leaves: game.Players.PlayerRemoving:connect(function(player) print("A player has left: " .. player.Name) end)


See Also