GetChildren (Method): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Camoy added |
>Camoy added |
(No difference)
|
Revision as of 13:31, 30 August 2010
|
- 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 i, j in ipairs(children) do print("index: ") --j is the object, i is the index of the table it is at print(i) print("Object: ") print(j) end