Glorpia Docs
Scripting / Method

Destroy()

Removes an instance and recursively removes its children.

Syntax

instance:Destroy()

Example: Remove Generated Content

Luau
local generated = workspace:FindFirstChild("Generated")

if generated then
    generated:Destroy()
end

After destruction

References to the destroyed instance no longer refer to an object that exists in the World. Accessing instance data after it has been removed can raise a runtime error.

Core world services are protected by the runtime and cannot be destroyed.