To make it easier to hide a whole tree of objects at once, I’m currently simply switching the Parent of this tree to game.StarterPlayer
.
I would like to know if it’s a problem, if there is a better folder for that, or if there is a better way to quickly hide a tree of objects?
Parent it to a folder in server storage, then clone it when needed. ServerStorage does not affect network performance and is only accessible from the server.
Wait, why switch the tree’s parent at game.StarterPlayer?
That was just an idea, actually, I just need a quick way to hide an entire tree of objects.
Like by script? You could create a script that uses string.match to find models that has the name “Tree” and parent it somewhere you want like a folder.
Parenting to ServerStorage will not create a delay, will not transfer the object to the server using the network?
You can use
nil
If you make a object’s parent’s nil, then bring it to workspace, it’ll appear where it was.
object.Parent = nil
Bring it back by
object.Parent = [workspace or the parent before]
Maybe ReplicatedStorage or ServerStorage to make it get hide from workspace.
Make the parent to RS or SS.
There is a problem here: if I have multiple objects to hide and I set all their parents to nil
, how will I find this list of objects later if they are not grouped?
Currently, putting them as a parent other than nil
I can find them …
Well, yeah, but if you make a local as in
local object1 = script.Parent.Parent.object1
object1.Parent = nil
then you can find it later by
object1.Parent = workspace
In fact, to change the Parent to nil
(before saving its current parent to a table for later recovering the original parent) proved to be the best solution.
That’s because, for some reason, changing Parent from one folder to another inside Roblox caused the object to get lost …
Thank you.
Sorry, I did not read completely properly. ServerStorage is good to initially add items to without network performance issues, but yes, transfer would still use network.