> For the complete documentation index, see [llms.txt](https://laot7490.gitbook.io/ltbridge/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://laot7490.gitbook.io/ltbridge/scripting/load-unload/on-player-unload.md).

# OnPlayerUnload

Execute a callback when a player unloads/drops.

{% hint style="info" %}
**Side:** Server · **Category:** Load & Unload · **API:** `LT.OnPlayerUnload`
{% endhint %}

## Example

```lua
LT.OnPlayerUnload(function()
    local src = source
    print("Player disconnected: ". src)
end)
```

## Parameters

| Name | Required | Description |
| ---- | -------- | ----------- |
| `cb` | Yes      | fun()       |
