Glorpia Docs
Scripting / Method

FindFirstChild()

Finds a named child without assuming that the object exists.

Syntax

instance:FindFirstChild(name, recursive?)

Parameters and return value

NameTypeDescription
namestringExact child name to search for.
recursiveboolean?When true, searches descendants instead of only direct children.
returnInstance or nilMatching 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
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