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

How would I make a loop that goes through every object in the game?

Self-explanatory. How would I achieve that?

1 answer

Well, if you just mean the direct children of game, you could easily do it like this:

for i,v in pairs(game:GetChildren()) do print(v.Name) end

But if you wanted it to loop through every single child game has through it's hierarchy you could use recursion.

1 comment

0

What's recursion?

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