Animation not working properly

Why isn’t my animation working?

Tool script:

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)

Did you make the animation priority of your attack animation Action and your idle animation Idle? It sort of seems like both are Core, and the default Idle animation is overriding them.