GetChildren (Method): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>JulienDethurens Did some small changes. |
>JulienDethurens No edit summary |
||
Line 1: | Line 1: | ||
<onlyinclude>{{Method | <onlyinclude>{{Method | ||
|name = GetChildren | |name = GetChildren | ||
|returns = | |returns = {{type|table}} | ||
|description = Returns a read-only table of the object's children. | |description = Returns a read-only {{type|table}} of the object's children. | ||
|object = Instance | |object = Instance | ||
}}</onlyinclude> | }}</onlyinclude> |
Revision as of 06:55, 15 February 2012
![]() | |
Returns | table |
Description: | Returns a read-only table of the object's children. |
Member of: | Instance |
Example
{{{1}}}
Example
It is highly recommended to use GetChildren with a generic for loop.
for index, child in pairs(Workspace:GetChildren()) do
print("Index: ", index)
print("Child: ", child)
end