GetChildren (Method): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>NXTBoy Obviously examples can't use meaningful variable names... |
>NXTBoy Obviously examples can't use meaningful variable names... |
(No difference)
|
Revision as of 09:12, 26 October 2010
![]() | |
Returns | Table children |
Description: | Returns a read-only table of this Object's children. |
Member of: | Instance |
- For loop (Simple example)
Example
local children = game.Workspace:GetChildren() for c = 1, #children do print(children[c].Name) end
- Generic for (More efficient example)
Example
local children = game.Workspace:GetChildren() for index, object in ipairs(children) do print("index: ",index) print("Object:",object) end