PlayerRemoving (Event)
From Legacy Roblox Wiki
(Redirected from PlayerRemoving)
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:
local Players = game:GetService("Players")
local function onPlayerRemoving(player)
print("A player has left: " .. player.Name)
end
Players.PlayerRemoving:connect(onPlayerAdded)