Need help with animating a tool

Hi, everyone.
I have made a weapon and I have animated it successfully. (So don’t link me a tutorial on how to animate tools)
But once I have exported it into a tool, the body parts animate successfully but the weapon does not.

Meant to look like:
https://gyazo.com/84bbcd1c2ecf6c556e0555aebc44106a

In action looks like:
https://gyazo.com/9ccf51d86c493aca41fce54ad7beb1de

As you can see, the weapon just stays locked to the arm.

If you want to take a good look around, here is my game file:
weaponAnimation.rbxl (24.1 KB)

Anyone know what I am doing wrong?

2 Likes

I know why it’s locked onto your arm. Just not how to fix it. The reason it’s locked on your arm is because you have it welded to it.

Attempt deleting the weld and replacing it with a motor6d, It should keep the weapon attached to the player but allow it to be animated.

If the tools main part name is “Handle” then there will automatically be a “RightGrip” weld in the Right Arm, just delete it.

2 Likes

Thanks. Your response led me on the right path.

I added this and it works fine:

local tool = script.Parent

tool.Equipped:Connect(function()
	rightArm = script.Parent.Parent["Right Arm"]
	rightArm:WaitForChild("RightGrip"):Destroy()
	
	local motor = Instance.new("Motor6D", rightArm)
	motor.Name = "HandleMotor6D"
	motor.Part0 = rightArm
	motor.Part1 = tool.Handle
end)

tool.Unequipped:Connect(function()
	local motor = rightArm:FindFirstChild("HandleMotor6D")
	if motor then
		motor:Destroy()
	end
end)

That would work, however if that player will never drop it or anything I suggest you create the motor and everything once. It’s just unnecessary imo to keep doing it and can lead to errors if right grip isnt found or player loses arm etc.

In my tools I just have the Motor6D inside the tool itself and just change the Part0 to the Arm on equipped.