---
title: "DebrisService"
description: "Schedules Instances to be destroyed after a delay without blocking the current script."
canonical: "https://docs.glorpia.com/services/debrisservice"
markdown: "https://docs.glorpia.com/services/debrisservice.md"
---
# DebrisService

Schedules Instances to be destroyed after a delay without blocking the current script.

**Category:** Services

## Access

```luau
local DebrisService = game:GetService("DebrisService")
```

> **Note:** `game:GetService("Debris")` and `game.Debris` are compatibility aliases for the same service.

## Members

| Name | Type | Description |
| --- | --- | --- |
| `Name` | string | DebrisService. |
| `ClassName` | string | DebrisService. |
| `AddItem(instance, lifetime)` | method | Schedules the Instance to be destroyed after lifetime seconds. If lifetime is omitted, it defaults to 10 seconds. |

## AddItem()

```luau
DebrisService:AddItem(instance, lifetime?)
```

`AddItem()` returns immediately. Destruction is scheduled through the runtime task scheduler, so the current script does not wait for the lifetime to expire.

A negative lifetime is treated as `0`. The lifetime must be a finite number. If the Instance has already been destroyed when the timer expires, the cleanup attempt is ignored.

## Example

```luau
local DebrisService = game:GetService("DebrisService")

local part = Instance.new("Part")
part.Name = "TemporaryPart"
part.Parent = workspace

DebrisService:AddItem(part, 5)
```

## Related

- [Destroy()](https://docs.glorpia.com/scripting/functions/destroy.md) — Destroy an Instance immediately.
- [Tasks and Utilities](https://docs.glorpia.com/scripting/utilities.md) — task.wait(), task.delay(), task.spawn() and other timing helpers.
