---
title: "FindFirstChild()"
description: "Finds a named child without assuming that the object exists."
canonical: "https://docs.glorpia.com/scripting/functions/find-first-child"
markdown: "https://docs.glorpia.com/scripting/functions/find-first-child.md"
---
# FindFirstChild()

Finds a named child without assuming that the object exists.

**Category:** Scripting / Method

## Syntax

```luau
instance:FindFirstChild(name, recursive?)
```

## Parameters and return value

| Name | Type | Description |
| --- | --- | --- |
| `name` | string | Exact child name to search for. |
| `recursive` | boolean? | When true, searches descendants instead of only direct children. |
| `return` | Instance or nil | Matching object, or nil if not found. |

## Example: Safely Find An Optional Part

```luau
local part = workspace:FindFirstChild("MovingPart")

if part then
    part.Position = Vector3.new(0, 8, 0)
end
```

> **Note:** The Workspace and normal Instance versions support the optional recursive argument. `Players:FindFirstChild(name)` searches direct player children only.

## Recursive lookup

```luau
local nestedPart = workspace:FindFirstChild("NestedPart", true)

if nestedPart then
    print(nestedPart:GetFullName())
end
```
