I made this moving screen but I liked to have a reset button where the screen goes to its original position. I tried this script but it moved the screen to a random location. I presume that it moved it that much (0, 14.5, 20) from that location it was. But I just want it to move to these coordinates (0, 14.5, 20)
s = script
g = game.Workspace
Car = s.Parent.Parent.Car1
-------------------------
function onClicked()
Car.Position -= Vector3.new(0, 14.5, 20)
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
s = script
g = game.Workspace
Car = s.Parent.Parent.Car1
local OldPosition = Car.Position
local Reverse = false
-------------------------
function onClicked()
if Reverse == false then
Car.Position -= Vector3.new(0, 14.5, 20)
Reverse = true
else
Car.Position = OldPosition
Reverse = false
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)