This is my script:
function onClicked() Door = script.parent.parent.Door script.Parent.onClicked:connect(Vector3.new(35.1, 4.7, -1.3) end script.Parent.ClickDetector.MouseClick:connect(onClicked)
It's my first script, so I have no idea how to do this. The numbers in Vector3.new(35.1, 4.7, -1.3) are the coordinates of the position I want the part to move to when it is clicked. Could anybody fix this script so it works? I haven't tried anything else because I have no idea what I could do.
Well, there was some capitalization mistakes, and your connection made no sense.
door = script.Parent.Parent.Door cd = script.Parent.ClickDetector -- have this lead to the click detector cd.MouseClick:connect(function() door.Position = Vector3.new(35.1, 4.7, -1.3) end)
If you want it to slide, that's another story.. Use a loop.