I am almost positive there is a property that lets you repetitively find the children of children until there is no more children (<- lol), can anybody give me the link, or write a script?
The proper name for a child or child of child or &c is descendant.
To do this, we require recursion upon Children.
The observation that we make is as follows:
A descendant D
of O
is either
O
, orO
.That is, the descendants of an object are the combination of the descendants of its children and its children.
function getDescendants(object) local descendants = {}; for _, child in pairs(object:GetChildren()) do -- `descendants` of `object` are: -- children: table.insert(descendants, child); -- and descendants of children: local descendantsOfChild = getDescendants(child); for _, des in pairs( descendantsOfChild ) do table.insert(descendants, des); end end return descendants; end
Link: http://wiki.roblox.com/index.php/FindFirstChild Answer: Thing:FindFirstChild("Part", true) --True means if search children of children.