I haven't every been able to figure it out
Possibly using a door as a example?
you need to put a click detector in a door and use a local script(and put it in StarterPack or StarterGui) and do something for example
workspace.Door.ClickDetector.MouseClick:connect(function() print("Clicked") end)
(sorry if that is not what you meant)