Any easier way to hide all objects tree?

I have a complex structure like this:

Currently, if I want to hide the 3D part and all its children, I have to loop with GetDescendants, detect if it’s a part (make Transparency=1) or a UI object (make Visible=false).

I wonder if there is an easier way to hide this whole tree of objects?

You could set the part’s Parent property to be out of the workspace.
But other than that the only way to make it invisible would be to iterate through descendants.
You would only need two lines of code to hide it anyway, one setting the part’s Transparency to 1 and one setting the SurfaceGui’s Enabled to false.

3 Likes