to rotate a part by 90 degrees.
But how do I make a part be a specific rotation instead of adding to the current rotation? BasePart.Orientation doesn’t replicate so thats out of the window
To rotate a part TO a specific rotation you can use CFrame.new(PART POSITION) * CFrame.Angles(NEW ROTATION). I’ve provided an example below which will change a parts rotation using CFrame to a given rotation, and then after 5 seconds reset it back to the default 0,0,0 rotation.
local part = script.Parent;
local newPartRotation = CFrame.Angles(math.deg(15), math.deg(25), math.deg(95)) -- the new rotation we want the part to have
part.CFrame = CFrame.new(part.Position) * newPartRotation; -- changing part's cframe rotation
wait(5);
newPartRotation = CFrame.Angles(math.deg(0), math.deg(0), math.deg(0));
part.CFrame = CFrame.new(part.Position) * newPartRotation;
To read more about CFrame you can check out the wiki page here which has some pretty nifty examples that I think you would benefit from!