---
title: "GetDescendants()"
description: "Returns every instance nested beneath an Instance or Workspace."
canonical: "https://docs.glorpia.com/scripting/functions/get-descendants"
markdown: "https://docs.glorpia.com/scripting/functions/get-descendants.md"
---
# GetDescendants()

Returns every instance nested beneath an Instance or Workspace.

**Category:** Scripting / Method

## Syntax

```luau
instance:GetDescendants()
```

## Example: Find Every BasePart In A Model

```luau
local model = workspace:FindFirstChild("Building")

if model then
    for _, object in ipairs(model:GetDescendants()) do
        if object:IsA("BasePart") then
            object.Anchored = true
        end
    end
end
```

> **Note:** The returned table contains descendants only; it does not include the object on which you called the method.
