GetChildren (Function): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Anaminus No edit summary |
>ArceusInator better example |
||
Line 13: | Line 13: | ||
<pre> | <pre> | ||
local children = game.Workspace:GetChildren() | local children = game.Workspace:GetChildren() | ||
for | |||
for i = 1, #children do | |||
if children[i]:IsA( "BasePart" ) then | |||
children[i].Color = Color3.new( 1, 0, 0 ) | |||
end | |||
end | end | ||
</pre> | </pre> |
Revision as of 21:45, 27 December 2010
|
Description
Example
local children = game.Workspace:GetChildren() for i = 1, #children do if children[i]:IsA( "BasePart" ) then children[i].Color = Color3.new( 1, 0, 0 ) end end