This is what I tried:
function onClicked(player)
script.Parent.Parent.Parent.Gate.Transparency = 0.9
script.Parent.Parent.Parent.Gate.CanCollide = false
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
Thanks in advance for your help!

1 comment
What seems to be the problem?