door=script.Parent.Parent.trapdoor
function onCicked()
door.Transparency=0.6
door.CanCollide=false
wait(2)
door.Transparency=0
door.CanCollide=true
end
script.Parent.ClickDetector.MouseClick:connect(onClicked) --this my script, i do not know why it does not work
door = script.Parent.Parent.Door
function onClicked()
door.Transparency = 1
door.CanCollide = false
wait(2)
door.Transparency = 0.3
door.CanCollide = true
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)--this is a random scipt i found,and it works
these scripts are very much alike but i do not know why mine does not work

2 comments
It is in workspace, I think the problem could be that maybe I put "trapdoor" in capital in the workspace but I did not capitalize it in the script
well i figured out the problem, i spelled click wrong, i put cick