How to add onto current CFrame angles instead of just setting them

Hello,
I was wondering if there was a way where I could add on to already current CFrame angles. By this I mean say x the axis was already 20 degrees. I want to add on 20 more degrees to the CFrame without manually adding them and just doing math.rad(40), instead I would want something like

--This would not actually work its just an example of what I want
basePart.CFrame = basePart.CFrame.Angles * CFrame.Angles(math.rad(20), 0, 0)

The above code (if it was to actually work) would add on 20 degrees to the angle.

It does work. CFrames are based on matrices, so using multiplication will be like addition in terms of it.

part.CFrame = part.CFrame * CFrame.Angles(math.rad(20), 0, 0))
2 Likes

Yeah I noticed this soon enough I was just looking at it wrong.

1 Like