Hello, I’m having trouble with Motor6D, and I’m not sure if it’s due to my understanding of how it works or a numerical issue.
When I set the C0 to position the weapon on my torso using the following code:
WeaponModel.Parent = Character.Torso
WeaponModel.Motor6D.Part1 = Character.Torso
WeaponModel.Motor6D.C0 = CFrame.new(-1, 1.1, -0.5) * CFrame.Angles(math.rad(0), math.rad(-20), math.rad(90))
It works perfectly fine.
However, when I try to set the C0 to align the weapon with my hand, it appears slightly offset, as shown in this video:
Here is the overall code of the system:
local function Unequip(Object)
WeaponModel.Parent = Character.Torso
WeaponModel.Motor6D.Part1 = Character.Torso
WeaponModel.Motor6D.C0 = CFrame.new(-1, 1.1, -0.5) * CFrame.Angles(math.rad(0), math.rad(-20), math.rad(90))
end
Unequip(WeaponModel)
local function Equip(Object)
WeaponModel.Parent = Character["Right Arm"]
WeaponModel.Motor6D.Part1 = Character["Right Arm"]
WeaponModel.Motor6D.C0 = CFrame.new(1, -1.45, -1.5) * CFrame.Angles(math.rad(0), math.rad(180), math.rad(90))
end
Note I tested the equip motor6d and it works on a dummy but it doesn’t seem to work on the character in game.