Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a script to only run for certain Objects within a Parent?

Asked by 6 years ago

For example welds,fire,particle emitters, constraints, etc to be the only ones affected.

1 answer

Log in to vote
0
Answered by 6 years ago
for i, child in pairs(Parent:GetChildren()) do
    -- Do code 
end
0
Thanks,but let's say that there is a lot of stuff inside of Parent. How would I make it work SPECIFICALLY for that ClassName? seanzhu 1 — 6y
0
if child.ClassName == "Class" then User#19524 175 — 6y
Ad

Answer this question