Animation not running propery with motor6d

I am creating animations for my gun currently.
I got an issue with running one animation. When I equip the gun the equip animation I set up works fine but once it’s finished I want the script to play an idle animation. It plays but the tool is moving to the original position it was when I welded the Motor6D to create the animations whilst the arms are fine. I don’t really get why.

Here’s the code that executes the animations

local Players = game:GetService("Players")

local player = Players.LocalPlayer
local character = player.Character
if not character or not character.Parent then
	character = player.CharacterAdded:Wait()
end

local humanoid = character:WaitForChild("Humanoid")
local Animator = humanoid:WaitForChild("Animator")

local Anim = Instance.new("Animation", humanoid)
Anim.AnimationId = "rbxassetid://10827727049"

local Anim2 = Instance.new("Animation", humanoid)
Anim2.AnimationId = "rbxassetid://10830372214"

local EquipAnim = Animator:LoadAnimation(Anim)
local ShoulderArmsAnim = Animator:LoadAnimation(Anim2)
ShoulderArmsAnim.Priority = "Idle"

script.Parent.Equipped:Connect(function()
	game.ReplicatedStorage.ConnectM6D:FireServer(script.Parent.Musket.BodyAttach)
	character.Torso.ToolGrip.Part0 = character.Torso
	character.Torso.ToolGrip.Part1 = script.Parent.Musket.BodyAttach
	
	EquipAnim:Play() --equip animation
	EquipAnim.Stopped:Wait()
	ShoulderArmsAnim:Play() -- This is the idle animation, it's looped and working (debugged to test)
end)

script.Parent.Unequipped:Connect(function()
	game.ReplicatedStorage.DisconnectM6D:FireServer()
end)

I’m not really sure what’s wrong what if you change wait to 0.01

That doesn’t change anything. The :Wait() means that the script will wait until the animation is done

Idk man lol. It might be ShoulderArmsAnim.Priority

Also isnt i had it action now idle nothing worked