Enum.RotationOrder doesn't work

Hello guys, I’m having trouble with Enum.RotationOrder, im trying to change the parameters order of the CFrame.fromEulerAngles function but it doesn’t work

here is my code:

MyPart.CFrame *= CFrame.fromEulerAngles(0, math.rad(45), 0, Enum.RotationOrder.YXZ)

or the Enum.RotationOrder.XYZ could be different as Enum.RotationOrder.ZYX

https://create.roblox.com/docs/reference/engine/enums/RotationOrder

as in this topic get said, you can change the rotation order, as i understood it process as if you use Enum.RotationOrder.ZYX then you’re able to control the Z from first parameter. it must be like that. i don’t know if i misunderstood that or not.
but if it’s like how i specified then it’s not working. when i change the Enum.RotationOrder as Enum.RotationOrder.ZYX and set first parameter which is X axis, it sets X axis as X axis in 3D workspace not Z axis it’s not replacing Z axis to X axis parameter of the function.

as i search for some reason in the math, it must be working as if you turn X axis Y axis must be turned and if you turn Y axis X axis must be turned. i had this problem to remember which one axis was turning which axis actually. so i was trying to use RotationOrder to not get used to Y X Z cordinated system, if i need to use it i had to remember which one axis was turning which one as i say, but then i found this function of CFrame, .fromEulerAnglesYXZ which already says which one turns which one so i don’t need this RotationOrder anymore but. that must have worked too. Because it’s already made for that problem i think. I don’t know why that didn’t work but as i say don’t need that anymore.

RotationOrder doesn’t change the order of parameters, instead it controls the order in which axis is rotated first, second, and third.

fromEulerAngles(rad(10), rad(20), rad(30), Enum.RotationOrder.XYZ)
-- 1. rotates 10 degrees on X axis FIRST
-- 2. rotates 20 degrees on Y axis SECOND
-- 3. rotates 30 degrees on Z axis THIRD
-- Versus...
fromEulerAngles(rad(10), rad(20), rad(30), Enum.RotationOrder.ZYX)
-- 1. rotates 30 degrees on Z axis FIRST
-- 2. rotates 20 degrees on Y axis SECOND
-- 3. rotates 10 degrees on X axis THIRD

You may wonder what’s the point? We’re rotating the same amount on the same axes, but a different axis order may produce different results. This is because you can twist then swing, or swing then twist. Consider the following images to understand why:

RotationOrder.XYZ (0, rad(90), rad(45)

  1. 90° Y swing - Blue → Green
  2. 45° Z twist - Green → Red
    RobloxScreenShot20250315_235826243

RotationOrder.ZYX (0, rad(90), rad(45)

  1. 45° Z twist - Blue → Green
  2. 90° Y swing - Green → Red
    RobloxScreenShot20250315_235812138

We’re doing a 45° twist and a 90° swing in both operations, but the order evidently changes the result (Red arrow).