Pretty much the title. For example let’s say it’s convenient for me to have several parts in the same folder, and for me to affect all of the parts with a script using :GetChildren() on the folder. However, some of those parts I don’t want to be affected, but it is just much more convenient if I put it into the folder. Is there a way I can have the script ignore them without manually checking for the names of the parts or something in the loop?
1 Like
I would put a simple BoolValue
and have the script also check each item for said BoolValue
if there is one, return, if there is not, then commence further
could also do this with Attribute which maybe setup on runtime or manually also in a loop if true just use continue like below
for i , part in ipairs(Folder:GetChildren()) do
if part:GetAttribute('Skip') then continue end
--- do other stuff here if its not to be skipped
end
Set the Archivable
property for the object to false
, then :GetChildren()
should not add it to the returned table.
Edit: but note that you won’t be able to access that object through scripts anymore.
Hope this helps!