GetChildren (Method): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Camoy more solid article |
>Camoy more solid article |
(No difference)
|
Revision as of 12:34, 18 January 2011
![]() | |
Returns | Table children |
Description: | Returns a read-only table of the object's children. |
Member of: | Instance |
Example
Using GetChildren with a for loop.local children = game.Workspace:GetChildren() for i = 1, #children do print(children[i].Name) end
Example
Using GetChildren with a Generic for, high recommended.for index, object in ipairs(game.Workspace:GetChildren()) do print("Index: ", index) print("Object:", object) end