I'm try to make a model become transparent and not transparent in a script but my clickdetector is in one of the parts inside the model, causing the error "Clickdetector is not a vaild member" since you can't make a clickdetector transparent. I can't figure out how to make it so it ignores the clickdetector though.
local SP = script.parent
local D = SP.Demat
local D2 = D.Demat
local AS = SP.Animationsnap
local CD = D.Demat.ClickDetector
CD.MouseClick:Connect(function()
for _, c in ipairs(AS:GetChildren()) do
c.Transparency = 0
for _, DM in ipairs(D2:GetChildren()) do
DM.Transparency = 1
wait(0.5)
for _, c in ipairs(AS:GetChildren()) do
c.Transparency = 1
for _, DM in ipairs(D2:GetChildren()) do
DM.Transparency = 0
end
end
end
end
end)

2 comments
I tried that but it said the same thing.
It goes in between lines 08 and 09.