Animations with equipping gun

Hello, I’m having trouble with animating a character when they equip a tool.

This is what the animation should look like:

And this is the code to play the animation:

local tool = script.Parent
local player = game:GetService("Players").LocalPlayer

local currentAnimation

tool.Equipped:Connect(function()
	local humanoid = player.Character.Humanoid
	
	local animation = Instance.new("Animation")
	animation.AnimationId = "http://www.roblox.com/asset/?id=10628723137"

	currentAnimation = humanoid:LoadAnimation(animation)
	currentAnimation:Play()
end)

tool.Unequipped:Connect(function()
	currentAnimation:Stop()
end)

However, when I test the game it looks like this:
Screenshot 2022-08-17 151844
(arms are farther apart)

I also tried just playing the animation when the player joins but it still changes whenever the gun is equipped:

Any help is appreciated.

I would assume thats the tools animation overwriting the holding animation you made.
Heres a solved post i found that might fix the problem

1 Like