I have three parts to a door. One is a union, and the other two are regular parts. I put this script inside the union in hopes of making the union and the other two parts disappear when the union was clicked... but, it doesn't work. I don't know what I did wrong.
h = script.Parent.Parent.Handle
k = script.Parent.Parent.Knob
u = script.Parent
function onclicked()
if h.Transparency == 0 and k.Transparency == 0 and u.Transparency == 0 and h.CanCollide == true and k.CanCollide == true and u.CanCollide == true then
h.Transparency = 1
k.Transparency = 1
u.Transparency = 1
h.CanCollide = false
k.CanCollide = false
u.CanCollide = false
else
h.Transparency = 0
k.Transparency = 0
u.Transparency = 0
h.CanCollide = true
k.CanCollide = true
u.CanCollide = true
end
end
script.Parent.ClickDetector.MouseClick:connect(onclicked)
If anyone could tell me what I did incorrectly, that would be awesome.

2 comments
Just check the parts in explorer. Is every single one 0 transparency and CanCollide set to true?
I think that was the problem. Thanks for the help. :)