We use cookies on this site to enhance your user experience
Collapse Sidebar


The PlayerRemoving event fires right before a Player is leaves the game. This event fires before Instance/ChildRemoved|ChildRemoved does on Players, and behaves somewhat similarly to Instance/DescendantRemoving. Since event fires before the actual removal of a Player, this event is useful to store player data using a GlobalDataStore.

This can be used alongside the Player/PlayerAdded event, which fires when a player joins the game. For instance, if you would like print a message every time a new player joins or leaves the game:

local Players = game:GetService("Players")

	print(player.Name + " joined the game!")

	print(player.Name + " left the game!")



Name Type Default Description

An instance of the player that is leaving the game.

Code Samples


This code will print "A player has left: ", followed by the player’s name, every time a player leaves: