OnPlayerLogout||doc136861

September 20, 2022

Format

local event = Event:GetEvent("OnPlayerLogout")

Describe

Launch this event after the player logs out. The event will be triggered on the client only when the main player logs out.

Callback function parameters

Type name introduce
Entity entity Log out the player's entity

Code example

local event = Event:GetEvent("OnPlayerLogout")
event:Bind(function(entity)
    print("OnPlayerLogout", entity)
end)