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
1 | workspace.Door.ClickDetector.MouseClick:connect( function () |
2 | print ( "Clicked" ) |
3 | end ) |
(sorry if that is not what you meant)