I have fashioned a cover that has a click detector in it. When clicked, the cover rises with a remote event function changing it's orientation and position, as shown below.
game.Workspace.ButtonCoverEvent2.OnServerEvent:Connect (function() game.Workspace.ButtonCover2.Orientation = Vector3.new (90,-90,0) game.Workspace.ButtonCover2.Position = Vector3.new (-70.02, 9.611, 18.6) end)
My question is, how do I code the function so that when the click detector is clicked again, the cover returns to it's original position/orientation?

1 comment
You can make a boolean variable that identifies whether to reverse it or not. If you want it reversed, just do the entire motion backwards.