i’m currently using RaycastHitbox V4 to create a sword weapon. However, I’m experiencing issues where animations using **Motor6D are not functioning correctly. I’m not sure what is causing the problem, and I would like to understand the possible reasons and how to fix it.
I’ve attached a video, images, and the model file to help illustrate the issue.
Any help would be greatly appreciated. Thank you!
local function AddMotor6d(char)
if char.HumanoidRootPart and tool and Motor6dAlreadyHas == false then
Motor6dAlreadyHas = true
local Motor6d = Instance.new("Motor6D")
Motor6d.Parent = char["Right Arm"]
Motor6d.Name = "Combat knife (Mesh)"
Motor6d.Part0 = char["Right Arm"]
Motor6d.Part1 = tool.Ea
Motor6d.C0 = CFrame.new(0.14, -0.765, -0.974) * CFrame.Angles(0,math.rad(-90),math.rad(90))
end
end
tool.Equipped:Connect(function()
Character = tool.Parent
Player = Players:GetPlayerFromCharacter(Character)
if #animationTable < 1 then
for i,v in pairs(animations:GetChildren()) do
animationTable[v.Name] = Character:WaitForChild("Humanoid").Animator:LoadAnimation(v)
end
end
AddMotor6d(Character)
end)
The Model: