---
title: "Destroy()"
description: "Removes an instance and recursively removes its children."
canonical: "https://docs.glorpia.com/scripting/functions/destroy"
markdown: "https://docs.glorpia.com/scripting/functions/destroy.md"
---
# Destroy()

Removes an instance and recursively removes its children.

**Category:** Scripting / Method

## Syntax

```luau
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.

> **Note:** Core world services are protected by the runtime and cannot be destroyed.
