The C0 is the CFrame offset relative to the part 0 of the motor6d/joint instance that it is attached to relative to the part 0 in a similar fashion to a weld. It’s actually known as a joint instance which yeah both welds and Motor6ds inherit.
part1.CFrame * C1 == Part0.CFrame * C0
And so we can solve for the weld C0 in a similar manner.
--Solving for Weld.C0:
weld.Part0.CFrame * weld.C0 = weld.Part1.CFrame * weld.C1
weld.Part0.CFrame:inverse() * weld.Part0.CFrame * weld.C0 = weld.Part0.CFrame:inverse() * weld.Part1.CFrame * weld.C1
CFrame.new() * weld.C0 = weld.Part0.CFrame:inverse() * weld.Part1.CFrame * weld.C1
weld.C0 = weld.Part0.CFrame:inverse() * weld.Part1.CFrame * weld.C1
This CFrame you have obtained is relative to the world and not part 0 of the motor6D.
It’s actually the part1.CFrame that we want to set the joint C0 towards.
Consequently, to make it relative to the C0 we reset the part0 CFrame like so below.
local resetPart0 = hrp.Stand2Human.Part0.CFrame:Inverse()
hrp.Stand2Human.C0 = resetPart0
This should make the part1 of the Motor6d joint go back towards the origin point of the world with an orientation of (0,0,0).
From there we can add the CFrame relative to the world in order to make it go where we want like below by “adding” a CFrame
when you multiply think of it as adding a rotation and position relative to that current CFrame
local resetPart0 = hrp.Stand2Human.Part0.CFrame:Inverse()
local desiredPart1CFrame = CFrame.new(standhrp.Position, torso.Position)
hrp.Stand2Human.C0 = resetPart0 * desiredPart1CFrame
This calculation assumes the C1 joint instance is equal to an identity CFrame.new() to make calculations simpler making the offset to this desiredPart1Cframe zero.
I tried it in my IK project and it should work for setting the desired part 1 CFrame relative to the C0 joint of a motor6d.
Hopefully, I’m correct about this I haven’t tested the exact CFrame math I used for the weld math explanation.