Why Isn't this animation Playing?

I made a gun, and it works well. But today I tried to make it play an animation, and it would not play. It errored with an error message of: Play is not a valid member of animation. Why am I getting this error?

Here is the gun:

The following code must be a local script:

local Tool = script.Parent
local FireRate = 5 -- How many times per second it fires a bullet :P
local Player = game:GetService("Players").LocalPlayer
local Mouse = Player:GetMouse() 
local TakeDownRemote = Tool:WaitForChild("Shot")
local Ammo = Tool:WaitForChild("Ammo")
local ShootVal = false
local Range = 250
local D = false
local Humanoid = Player.Character:FindFirstChild("Humanoid")
local Animation = Tool:WaitForChild("Hold")

script.Parent.Equipped:Connect(function()
	Humanoid:LoadAnimation(Animation)
	Animation:Play()
end)

local function Shoot()
	if ShootVal == true and Ammo.Value > 0 and D == false then
		D = true
		repeat
			wait(1 / FireRate)
			Ammo.Value = Ammo.Value - 1
			local ray = Ray.new(Tool.ShootSlider.CFrame.p, (Mouse.Hit.p - Tool.ShootSlider.CFrame.p).unit * Range)
			local part, position = workspace:FindPartOnRayWithIgnoreList(ray, {script.Parent, Player.Character}, false, false)
			
			
			if part then
				if part.Parent:FindFirstChild("Humanoid") then
					TakeDownRemote:FireServer(part.Parent:FindFirstChild("Humanoid"))
					--part.Parent:FindFirstChild("Humanoid"):TakeDamage(10)
				elseif not part.Parent:FindFirstChild("Humanoid") then
					if part.Parent:IsA("Accessory") then
						part.Parent:Destroy()
						
				end
			end
		end
		until Ammo.Value <= 0 or ShootVal == false or Player.Character:FindFirstChild("Humanoid").Health <= 0
	end
	wait(1 / FireRate)
	D = false
end

Mouse.Button1Down:Connect(function() 
	ShootVal = true
	Shoot()
end)
	
Mouse.Button1Up:Connect(function()
	ShootVal = false
	
end)

Can you put the code instead of the model?

Did you loaded the animation??
Like:

local AnimTrack = Hum:LoadAnimation(Animation)

script.Parent.Equipped:Connect(function()
Humanoid:LoadAnimation(Animation) :Play()
end)

Instead of playing the instance itself u should play it this way im not sure how i should explain this haha ^^ .

Fixed code:

local track = nil

script.Parent.Equipped:Connect(function()
 track = hum:LoadAnimation(animation)
 track:Play()
end)

script.Parent.Unequipped:Connect(function()
 if track then
  track:Stop()
 end
 track = nil
end)

Put this as solution if that worked :3

Ahh… Yes thank you so much @Sunx_x, and @Darkwolfgameryr! I don’t understand why my version of the “Playing animation” script did not work. But at least I have 2 solutions! Thanks sooo much.

U were playing the instance (object) instead of playing the loaded animation itself.

Hello is there a takedown animation like apex or warzone bc I have been looking for that