OnEntityRemoved||doc136864

September 20, 2022

Format

local event = Event:GetEvent("OnEntityRemoved")

Describe

Entity objects emit this event before being destroyed

Callback function parameters

Type name introduce
Entity entity Destroyed entity

Code example

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