How to make a CFrame have a set angle instead of adding on angles

I am trying to set a CFrame’s angles without having to add on a certain amount of angles. I want it to be something like this.

--Pretend that the part's rotation before the below line of code is 10,0,0
part.CFrame = part.CFrame * CFrame.Angles(math.rad(45),0,0)
--[[I want it where instead of what it usually would do which is add on 45 degrees and
make it 55 in total, I want it to set the x to a straight 45 degrees and not add
anything on.

you can do this by only changing part position in the first CFrame.

--            Here you only change position
part.CFrame = * CFrame.Angles(math.rad(45),0,0)
1 Like