Character's RightHand teleports when Motor6D's part1 is set

I am currently dealing with an issue in my gun system where the Motor6D holding together the right hand (part0) and the guns handle (part1) teleported somewhere outside the viewmodel I am working with, I have finally narrowed down all my issues to the Motor6D. I have tried using the C0 inverse method to keep the hand from going anywhere, but that has not done me any good, which is very odd. If anyone has an idea on how to keep the right hand from teleporting away when the Part1 is set to handle, that would be great.

I normally just use attachments to predefine the cframes for the motor6Ds
put an attachment in the hand for where you want the gun to attach to. that attachment’s .CFrame is C0
put an attachment in the gun’s handle for where you want the hand to attach to. that attachment’s .CFrame is C1

if you’re still going to try calculating the cframes ingame while ignoring C1,you calculated it properly, but you may need to wait a physics step before using Part1’s cframe if it needs to teleport using something like roblox physics
not waiting the physics step would be using the cframe from before the teleport

I tested this about a week ago, but indeed, Part0 of a motor6D does teleport to Part1 if I’m not mistaken, so you wanna just switch the Part0 to Part1, and Part1 to Part0, and you should be good.

Do you mean that I should create an attachment within the RightHand for example, then the C0 of the Motor6D would be the attachments cframe?

no, it depends on physics to decide which teleports to which
it’ll change if one’s mass is different or if one is anchored

yep, then C1 would be the cframe of the attachment in the other part

Okay, so essentially putting an attachment inside the right hand would cause the C0 of the Motor6D to be that attachments CFrame? I’m trying to CFrame the RightHand to the C0.

oh, since the hand is going to the C0, the hand is Part1(?), and the attachment in the hand would be C1

an example of this setup in the normal r15 rigs:
the UpperTorso has an attachment called something like NeckRigAttachment which is the C0 for the neck motor6D. the head has an attachment with the same name which is the C1 for the neck motor6D

At the moment, the hand is Part0, and the handle is Part1. To date, switching the Part0 and Part1 has no effect.

Oh I see what you mean now, I’m wondering how I should go about keeping the right hand from moving to the handle, and should I use the hand as the c0, or the hands attachment? Since from what your saying I would make the hand the C0, and the attachment in the hand C1, although im not sure.

I’d make all of the parts in the tool massless and unanchored
and you could also anchor the player’s humanoidRootPart while equipping