Skip to main content

Collider.Destroy(Object obj, number t = 0)

Removes a GameObject, component or asset.

Parameters:

NameTypeDescription
objObjectThe object to destroy.
tnumberThe optional amount of time to delay before destroying the object.

Usage

---@type Object
local obj;

---@type number
local t;


Collider:Destroy(obj, t)