Custom Rig Motor6D part change position

Heeya! (i dont know if this topic is building or scripting… depends on answer…)

I’m trying to build a custom character rig in order to use a 3d mesh made in blender.

I added a Motor6D, and everytime I add the Part0 and Part1 to the properties, the part change its position and goes to Root position of the character.

I used RigEdit pluging before, and it works great, BUT, How do I use native Motor6D manually in studio, without using that plugin to create a custom character?
I see Vector3 items inside attachments on parts of the normal Roblox Rig… I tried adding that too, to see if that was the problem… didnt work… any idea? Or I just stick forever with EditRig pluging?

1 Like

You need to calculate the C0 and C1 properties of the Motor6D. Motor6D.Part0.CFrame*Motor6D.C0 should have the point, that you want to rotate Part1 around when animating, as it’s position. If you have attachments parented to the parts and moved to those positions, you could try to calculate the offsets like this.

local part0 = -- the part that's more directly connected to HumanoidRootPart
local part1 = -- the other part (a leg, for example, if part0 is the torso)
local joint = -- the Motor6D connecting these parts

joint.C0 = part0.AttachmentName.CFrame
joint.C1 = part1.CFrame:ToObjectSpace(part0.CFrame*joint.C0)
2 Likes