GetChildren (Method)

From Legacy Roblox Wiki
Revision as of 09:12, 26 October 2010 by >NXTBoy (Obviously examples can't use meaningful variable names...)
Jump to navigationJump to search
GetChildren( )
Returns Table children
Description: Returns a read-only table of this Object's children.
Member of: Instance
Example

local children = game.Workspace:GetChildren()
for c = 1, #children do
    print(children[c].Name)
end

Example
local children = game.Workspace:GetChildren()
for index, object in ipairs(children) do
    print("index: ",index)
    print("Object:",object)
end