EDIT : To anyobody who wanted to do what I wanted to do, Here's the code
local function onClicked()
print("successfully clicked")
if script.Parent.Position == Vector3.new(INSERT POINT A) then
script.Parent.Position = Vector3.new(INSERT POINT B) else
script.Parent.Position = Vector3.new(INSERT POINT A)
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
So I'm having trouble and I'm kind of confused, I'm making a drawer that can be pulled and pushed, Only problem is I don't know how I could make if the Vector3 in a certain position when clicked, It gets pushed back to it's original position :
function onClicked() -- funcc
print("successfully clicked")
script.parent.Position = Vector3.new(-6.834, 7.5, 59.8) -- new vector3 when clicked
if script.parent Vector3(-6.834, 7.5, 59.8) then -- i suck but here's the problem, i
script.parent.Position = Vector3.new(-9.257, 7.339, 59.476) -- go back to original position
print("successfully clicked")
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

1 comment
Doesn't move anymore, And there's no errors