Skip to content

Element events Destroyed

Jérôme Leclercq edited this page Dec 8, 2020 · 3 revisions

Element event:Destroyed

Description:

Called whenever this element is about to get removed from the match.

Parameters:

  1. self: Triggered entity.

Remarks:

  1. As this event doesn't return anything, it's possible to bind an async callback on it. However one must be careful when doing so, as the entity will no longer exists on the very next tick.

Example code:

entity:On("Destroyed", function (self)
	print("I will no longer exist next tick!")
end)

Clone this wiki locally