Hi,
I'm making a gate that when you click it all the parts in the gate model disappear. This works, however throws errors out when it gets to the ClickDetector and then doesn't work correctly.
However, I don't see why it should? I've made it so it checks the ClassName of each child to ensure the correct things are happening to the correct parts. I'm a bit stumped.
Here's the code:
local function CloseClose()
for i,v in pairs(script.Parent.Closed:GetChildren()) do
if v.ClassName=='Part' or 'UnionOperation' then
v.Transparency=1
v.CanCollide=false
else
v.MaxActivationDistance=0
end
end
end

1 comment
Please consider at least reading my answer.