Yuari
Documentation
Docs/Instances/WaitForChild

WaitForChild

Yields until the child exists (or times out).

Syntax

:WaitForChild(name: string, timeout?: any) -> Instance

Parameters

ParameterTypeDescription
namestringThe name used for the lookup or new object.
timeout?anyThe timeout value used by the call.

Returns

TypeDescription
InstanceInstance?

Description

WaitForChild is part of the Instances library. Instances are live proxies backed by game memory. Property reads and method calls go through Roblox's own objects.

The calling thread yields as needed and resumes on the module scheduler when the operation completes.

Example

local target = workspace:WaitForChild("Map", 5)
print(target)

Notes

  • Instance proxies are backed by live game memory.