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

How do i get all the children from one instance?

So basically i'm trying to get ALL the children from the game's Workspace. Like even the childrens children but i have no idea how to do it except getting all the children and repeating the for loops on the childrens children and so on and so on.

1 answer

✓ Accepted answer

I would actually use the GetDescendants function to get every single child inside of an instance. For example:

for index, value in pairs(game.Workspace:GetDescendants()) do
	--//value is the current item we are iterating through
end

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