GetChildren
Direct children, or the full descendant tree.
Syntax
:GetChildren() -> table
Parameters
This function takes no parameters.
Returns
| Type | Description |
|---|---|
table | {Instance} |
Description
GetChildren 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 call is read-only: it resolves the current value when invoked and does not change the underlying state.
The aliases :GetDescendants() resolve to the same implementation.
Example
for _, child in ipairs(workspace:GetChildren()) do
print(child.Name)
end
print(#workspace:GetDescendants())
Notes
- Aliases:
:GetDescendants(). - Instance proxies are backed by live game memory.