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

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