Animation not working properly

In the video below, im touching a brick which is supposed to play a specific animation. The problem is that when I do so, the animation does play but sometimes not as expected. When I first touch the brick, the animation is played but barely. The animation is supposed to like the character taking out his gun and shooting it but it’s just the character barley reaching for it. I dont know why it causes this, I didn’t even make an animation ressembling something like that.

Here is my code located in a server script as a child to the brick.:

local db = false

script.Parent.Touched:Connect(function(hit)
    local hum = hit.Parent:FindFirstChild("Humanoid")
    
    if hum and not db then
        db = true
        
        local animator = hit.Parent:FindFirstChild("Animator")
        
        if not animator then
            animator = Instance.new("Animator")
            animator.Parent = hit.Parent:WaitForChild("Humanoid")
        end
        
        local anim = Instance.new("Animation")
        anim.AnimationId = "rbxassetid://80055688272722"
        anim.Parent = animator
        
        local track = animator:LoadAnimation(anim)
        track:Play()
        
        task.wait(2)
        db = false
    end
end)


What is the animation supposed to look like
@musman65

Make sure the animation priority it set to be the highest which im pretty sure is Action4

Oh yeah i forgot to clarify that in the post, when I touched it the second time, it played it how it’s supposed to. And the animation priority is set to action currently, I tried setting the animation priority to action 4 but the glitched version of the animation still happens sometimes