How to assign an orientation to motor6d C0

Im trying to just sent the Y axis of RootJoint C0 to -135 instead of -180.

however, when i try to do so, i end up with completely different results, The orientation magically sets itself to 45, -90, 90

i’ve tried other methods, but so far none of them worked the way i want to

local M6D = script.Parent.HumanoidRootPart.RootJoint
M6D.C0 = CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-135), math.rad(0))

End Result:

The desired result should look something like this:

You are essentially using CFrame.Angles rn.
You probably want to use fromEulerAnglesYXZ instead.

You can try using my plugin to compile desired CFrame constructor:

1 Like

Used that, and it worked like a charm.
I converted the motor6d using your plugin and took this piece of code, which i implemented into the script.

C0 = CFrame.fromEulerAnglesYXZ(math.pi*-0.5,math.pi*-0.75,0);

Thank you

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.