Destroy
Removes the instance by unparenting it.
Syntax
:Destroy() -> nil
Parameters
This function takes no parameters.
Returns
| Type | Description |
|---|---|
nil | This function does not return a value. |
Description
Destroy is part of the Instances library. Instances are live proxies backed by game memory. Property reads and method calls go through Roblox's own objects.
The operation is performed immediately using the arguments supplied at the call site.
Example
local part = Instance.new("Part", workspace)
part:Destroy()
Notes
- Instance proxies are backed by live game memory.