Animation not working properly

Made an attack animation in Moon Animator, but the animation doesn’t work when I click. Does anyone know why? The priority is Action.

local player = game.Players.LocalPlayer
repeat wait() until player

local humanoid = player.Character:WaitForChild("Humanoid")
local idle = humanoid.Animator:LoadAnimation(script.Animation)
local attack = humanoid.Animator:LoadAnimation(script.at)

script.Parent.Equipped:Connect(function(mouse)
	idle:Play()
	mouse.Button1Down:Connect(function()
		attack:Play()
	end)
end)

script.Parent.Unequipped:Connect(function()
	idle:Stop()
end)

It looks like your idle animation and attack animation are overlapping eachother