Why do Motor6d’s change the position of parts when you connect 2 together, and how can I connect them while keeping the parts in their correct position.
I have noticed that Motor6d’s have C0 and C1, not really sure how to use them so pls explain it to me if you can.
There must be plugins that connect parts without changing position right?
Why are you using a
Motor6D? Do you need to change the offset of
Part0? If the offset should be constant, then you could just use a
If you do need to change the offset, the best way to calculate
C1 may vary depending on how you want to change the offset. The simplest way is the following:
Motor6D.C0 = part0.CFrame:Inverse() * part1.CFrame
Motor6D.C1 = CFrame.new() -- identity matrix, this line is not necessary
Why a Motor6d? Well I want to animate of course
When animating, you probably want to rotate
Motor6D.Part1 around a point. A motor6D satisfies the following equation:
Part0.CFrame * Motor6D.C0 * Motor6D.Transform = Part1.CFrame * Motor6D.C1
You can read the beginning of
this reply for an explanation of how the CFrame properties of a
Do you have attachments or something else that defines around which point animations will rotate
You can use a plugin like RigEdit to connect the parts together using Motor6ds.
The equation for Motor6D
@RoBoPoJu mentioned is similar to welds (They both inherit from JointInstance class) and RigidConstraint so you can use attachments to visualize the connection position or offsets (C0 and C1) that a plugin does like the example below:
Perhaps this example will be a lot more clearer.
Create an attachment between the parts you want to weld, such as a sword and hand in the R15 I will be using the “RightGripAttachment” within.
Use this script to connect the two together in the same place
local dummy = script.Parent
local swordAttachment = workspace.ClassicSword.Handle.Attachment
local rightGrip = dummy.RightHand.RightGripAttachment
local rigidConstraint = Instance.new("RigidConstraint")