Hi,
I have this script and I want it so that I press the button and it will go up. But when I press it again I want it to go back down to its original position. Here is the script, I have copied it from the other buttons that I have used but I got confused with all the coordinates and stuff.
Script:
btn = script.Parent.ClickDetector
function onClick()
if script.Parent.Parent.StageScreen.SurfaceGui.Enabled == false and
script.Parent.Parent.StageScreen.Position == "-103.5, 23.99, 243.1" then -- They are the origin position.
script.Parent.Parent.StageScreen.SurfaceGui.Enabled = true
script.Parent.BrickColor = BrickColor.new("Medium stone grey") -- Not sure if s.p is the part, just change if needed
else
script.Parent.Parent.SR.CanCollide = false
script.Parent.BrickColor = BrickColor.new("Really red") -- Same here
end
end
btn.MouseClick:connect(onClick)
I want it so that the part would move from; Starting: -103.5, 23.99, 243.1 End: -103.5, 35.99, 243.1 And then move back when I press the button again.
I would also like it to turn off the surface gui. The link to it is: script.Parent.Parent.StageScreen.SurfaceGui.Enabled
Thank you Kieranm9090
If you need more info just pm me, Thanks!

1 comment
Ok thanks! I will see if I can get it fitted into the script now!