I made a script that was like long until Validark made it shorter. And two things: Thank you Validark and also, I am having problems with it for some reason. It is not doing what I want it to do. What I wanted it to do was to rotate without making the part position up. When I clicked it, it rotated good, but instead, the part went from 1.981 to 2.481. I want it to stay the same no matter where you put the radio. Also, on the -9.37 for positon or CFrame, I put it there to move it back to make the rotation better and to line it up. That position should happen on the rotation where it says 173.413. Also I want that to work if I ever move it. Because, if I publish it as a model, people or I might put it in a different place which will mess up the positioning a little.
--Validark Answered Script (Thank you)
local cover = game.Workspace.Radio.Cover
local slot = game.Workspace.Radio.Slot
debounce = false
--Creates a table of values
local rotationXValues = {-180, 179, 178, 177, 176, 175.9, 175.413, 174.413, 173.413, 172.413, 171.413,
170.413, 169.413, 168.413, 167.413, 166.413, 165.413, 164.413, 163.413, 162.413, 161.413, 160.413, 155.413,
150.413, 145.413, 140.413, 135.413, 130.413, 125.413, 120.413, 115.413, 110.413, 105.413, 104.413, 103.413, 102.413, 101.413, 100.413, 99.413, 98.413, 97.413, 96.413, 95.413, 94.413, 93.413, 92.413, 91.413, 90.293}
function onClicked()
if not debounce then
debounce = true
for a,v in pairs(rotationXValues) do --This "for" loop runs through each value of the table
cover.CFrame = CFrame.new(cover.CFrame.X, 1.981, -9.37)
cover.Rotation = Vector3.new(v, 0, -180)
wait(.1)
end
debounce = false
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
I hope you understand. Validark if you are reading this, thank you and I hope you understand as well and help as well. Again, thank you.

1 comment
Thanks Blue, YOU ROCK. Wait, also, if I want to make it go backward, as in after you click it and the rotation stops at 90 on the X value, and do I make it go backward by making it 45-90-45. I want it to do this also, where when I click it, it rotates to 90 and then click it again to go back to normal. Hope you know what I mean