Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Can you get children of get children?

Just wondering if it would be possible to get the children of children through get children?

EX:

objectsInTheChildrenOfWorkspace  =  game.Workspace:GetChildren():GetChildren()
print(objectsInTheChildrenOfWorkspace)

Thanks

1 answer

✓ Accepted answer

Try this:

for i,Child in pairs(game.Workspace:GetChildren()) do --Gets children of workspace
	for i,Child2 in pairs(Child:GetChildren()) do --Gets children of the children in Workspace
		Child2.Transparency = 1 --Example
	end
end

1 comment

0

Cool

This discussion is preserved as it was. New answers, comments, and votes are closed.