How to find intended Motor6D rotation axis?/How to rotate Motor6D axis?

I have a rig which i animated months ago, but i wanted to separate one of the limbs (which is a union, the lower torso) for customization porpuses, heres the original limb and the now separated one:

bandicam 2022-07-20 14-03-31-701

Separated limb:
bandicam 2022-07-20 14-03-39-852

After that, i had to make a new motor6D for the lowertorso, and so Attach the buttons to the new lower torso obviously.

But now, this common problem now has got me and the motor6D its not in the correct rotation, but i don’t know how to rotate it to the intended one.

Intended animation with the Old lower torso limb:

The separated torso limb’s result:

i have tried to rotate the motor6D 45 degrees, 90 degrees, 22.5 degrees, and including the Separated torso’s (cyan coloured part) rotation which is 27.27, but i never get the intended or perfect rotation, maybe i just have to keep trying until i find it but, is there a faster solution for this?

i use Rigedit to rotate it, but never specifies which are the Motor6D’s surfaces. (front, back, etc.)

Please take your time to read this if you dont understand, thank you!

(Previously posted in a wrong category.)