How to search through entire game/workspace?

Hey, so I’m looking on how to search the entire workspace to find a specific thing.

An example of this being used would be a part counter, the script must search through the entire workspace, through the models and whatever else to find the parts.

How would I do this? To find parts and anything else of that nature.

1 Like

Use a for loop on game.Workspace:GetDescendants()

and then you can look at the name value.

1 Like

Thank you! Marked as Solution.