I can't figure out how to rotate a part 90 degree after clicked on.
local topCenter = script.parent
local clickdetector = game.Workspace.Wedge.ClickDetector
clickdetector.MouseClick:Connect(function()
topCenter.Orientation = Vector3.new(-90,0,0)
end)
I'm using this code but it only rotates the part once.
I want to be able to rotate it multiple times.

4 comments
Thank you so much!
your welcome
It's far better practice to use CFrame.Angles if you want to make the rotation occur multiple times. topCenter.CFrame = topCenter.CFrame * CFrame.Angles(math.rad(-90),0,0)
I did this at school, so I didnt have time to actually plan this through...