> For the complete documentation index, see [llms.txt](https://docs.easy.gg/scripting/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.easy.gg/scripting/bedwars-scripting/events/playerremoving.md).

# PlayerRemoving

Example usage:

```lua
Events.PlayerAdded(function (event)
    ChatService.sendMessage(event.player.displayName .. " joined the game!")
end)

Events.PlayerRemoving(function (event)
    ChatService.sendMessage(event.player.displayName .. " left the game.")
end)
```

### Parameters

#### player: [Player](/scripting/bedwars-scripting/objects/player.md)

The player that is about to leave the game server.
