Motor6D not constraining parts to the correct orientation

I’ve been trying to make a Motor6D for a part (which I’ll call Part A) that connects it to another part (Part B) that is also connected by a Motor6D to the player. Part B is in the position that I want it to be from its Motor6D:

motor6D.C0 =,.1,.73) * CFrame.Angles(math.rad(90),math.rad(45),0)

When that Motor6D is used, it properly places the part (0, .1, .73) studs away.
However, when I’m trying to connect Part A to Part B:

motor.C0 = - partB.Position)

It doesn’t actually place the part at what would be the distance between Part A and Part B. Keep in mind that both of these parts are in a model where they’re correctly placed from each other without Motor6Ds, and the script is using the distance between those parts within that model. I’m trying to take that model and turn it into one with Motor6Ds.
I’ve been experimenting around with things to try and solve this problem, and I’ve found that if Part B is not orientated at (90, 45, 0), but instead at (0, 0, 0), Part A is placed in exactly the right spot. But once I try and connect Part B to the player with a Motor6D at an angle of (90, 45, 0), Part A stays in the same exact spot, without regard to the fact that Part A was orientated in a different direction. My question is, how do I make Part B’s Motor6D actually take Part A’s orientation into account when creating its C0? Sorry if this explanation is confusing at all; I’m trying my best to explain it.

The highlighted parts are Part A, and this is where they’re supposed to be:

This is where the parts actually go:

The place where it puts the parts is where they would be if Part B was orientated at (0, 0, 0), but I need Part B to be rotated in a different way while having Part A take the rotation into account.

Bumping; I still need help here.

Bumping again. I know this issue is kinda complicated, but hopefully someone knows something that can help me here.

Bumping this post once again…

I’m not too experienced with these but would a Rig Editor plugin do any good?

I hadn’t considered using a plugin before, actually. I just installed this plugin:

And I set up the Motor6Ds beforehand. And it worked! I guess that solves my problem, although I’m still curious as to how this could be done with scripting. But I’ll go ahead and mark this post as solved.

1 Like