CFrame.Angles objectSpace help

This part is rotated by 13.75 degrees and 20.8. It then needs to be rotated onto its X axis by a certain amount of degrees, but what ends up happening is the Y axis is also acted upon when this happens.

After first rotation, it is able to get to this using

newThing.CFrame = oldThingCFrame*cf(0,yChangeObject,0)*cfa(xAngleChange,0,zAngleChange)
where oldThingCFrame is the part.CFrame before a loop runs to slowly transition the CFrame.

During the second rotation, it uses

newThing.CFrame = (oldThingCFrame+ v3(xChangeWorld, yChangeWorld, 0)) * cfa(xAngleChange, 0, 0) where oldThingCFrame is the result of newThing.CFrame. Logically, newThing is the current angle during the loop, so for the next loop, newThing at the end of its run becomes the old one for the next loop.

xAngleChange is 22.9 degrees when the picture was taken. And no other angles acted upon it, so it rotated 21.29 degrees X, 9.4 degrees Y, 3.96 degrees Z.

My question is how can I make sure the Y and Z angle isn’t changed at all when I only want the X one changed?

1 Like

I found help from this post
https://devforum.roblox.com/t/cframe-angles-help-needed/37332/2?u=theamazeman

1 Like