Event
network:peer:leave
ServerFired when a peer disconnects from the server
Signal
"network:peer:leave"Arguments
| Type | Name | Description |
|---|---|---|
int | peer_id | Id of the peer that left |
This signal is only fired on the server.
- Use it to clean up any state you keep per peer.
Example
local players = {}
util.event.on("network:peer:leave", function(peer_id)
players[peer_id] = nil
end)