---
title: "GetChildren()"
description: "Returns the direct children of an Instance or Workspace."
canonical: "https://docs.glorpia.com/scripting/functions/get-children"
markdown: "https://docs.glorpia.com/scripting/functions/get-children.md"
---
# GetChildren()

Returns the direct children of an Instance or Workspace.

**Category:** Scripting / Method

## Syntax

```luau
instance:GetChildren()
```

## Return value

| Name | Type | Description |
| --- | --- | --- |
| `return` | table | A 1-indexed table of direct child instances. |

## Example: Rename Direct Children

```luau
local folder = workspace:FindFirstChild("Generated")

if folder then
    for index, child in ipairs(folder:GetChildren()) do
        child.Name = "Item" .. index
    end
end
```

## Children vs descendants

`GetChildren()` only returns one hierarchy level. Use `GetDescendants()` when you need everything nested below an object.
