I'm unsure on how to fix this code and why it wont work. Can someone hint me in the right direction?
function Click() script.Parent.Position=Vector3.FromAxis(17.142,26.116,-263.459) end game.Workspace.restraint1.ClickDetector.mouseClick:connect(Click)
Simple change:
local clicker = script.Parent local part = script.Parent.Parent clicker.mouseClick:connect(function() part.Position = Vector3.new(0,0,0) --change to position you want end)
make sure this is a script inside click detector and make sure the click detector is in a part.
so the order will be part's children is click detector, click detector children is script
Please accept answer and upvote if helped!