CFrame's Orientation isn't changing as I expected

how can I set the orientation of an NPC’s HumanoidRootPart to a specific orientation using CFrames.
Note: I tried multiplying its CFrame with the new orientation like

HumanoidRootPart.CFrame = HumanoidRootPart.CFrame * CFrame.Angles(x,y,z)

but the problem is that there is some offset and the Orientation is not the same as I thought it will be.
The main problem is that the NPC’s orientation is not so accurate and slightly different and other than what I told the script to do.

HumanoidRootPart.CFrame = HumanoidRootPart.CFrame * CFrame.Angles(math.rad(x),math.rad(y),math.rad(z))

maybe this will help

1 Like

Yeah, you will want to wrap x, y and z in a math.rad() because CFrame.Angles() takes in radians instead of degrees. (math.rad() will convert degrees into radians.)