How to quickly delete "empty" models?

Forgive me if i posted this in the wrong channel

Anyway, I have a lot of empty models in studio right now, and I really want to get rid of them all to clear up clutter but there’s too many for me to do manually. Is there a much better and faster way of doing this? Thanks

You could simply use Command line to execute code to check Descendant length of :

game:GetService("Selection"):Get() : {Instance}

If the parent contains zero descendants, destroy it!

could run this in your command bar
for _, v in workspace:GetDescendants() do if v:IsA("Model") and #v:GetChildren()==0 then v:Destroy() end end

get all descendants in workspace… if they’re a model and the number of children is 0, destroy it. Backup your game first in-case

4 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.