Animation wont load

Im making an animation but it wont load. Here is the code.

--Del later
local Range = 30

local player = game.Players.LocalPlayer
local char = player.Character
local hrp = char:WaitForChild("HumanoidRootPart")
local hum:Humanoid = char.Humanoid

hum.Died:Connect(function()
	for _, v in pairs(workspace.Mobs:GetChildren()) do
		if v.Name == player.Name then
			v:Destroy()
		end
	end
end)

for _, v in pairs(workspace.Mobs.Range:GetChildren()) do
	task.spawn(function()
		local newNpc = game.ReplicatedStorage.BarryTech:Clone()
		print("cloned")
		newNpc.HumanoidRootPart.CFrame = v.CFrame * v.PivotOffset
		newNpc.Parent = workspace.Mobs
		newNpc.Name = player.Name
		local originalPos = newNpc.HumanoidRootPart.Position
		local roaming = false

		task.spawn(function()
			local Animation = newNpc.Animation.AnimationId
			local newAnim = Instance.new("Animation")
			newAnim.AnimationId = Animation
			local playingAnim = newNpc.Humanoid.Animator:LoadAnimation(newAnim)

			newNpc.Humanoid.Running:Connect(function(speed)
				if speed > 0 then
					if not playingAnim.IsPlaying then
						playingAnim:Play()
					end
				else
					playingAnim:Stop()
				end
			end)
		end)

		local roamingCoroutine = coroutine.create(function()
			task.spawn(function()
				while true do
					local check = Instance.new("Part", workspace)
					check.Position = (newNpc.HumanoidRootPart.CFrame *CFrame.new(math.random(0, 22), 0, math.random(0, 22))).Position
					check.Name = math.random(11111, 999999)
					local partsInRange = workspace:GetPartsInPart(v)
					if table.find(partsInRange, check) then
						newNpc.Humanoid:MoveTo(check.Position)
						check:Destroy()
						task.wait(3)
					else 
						check:Destroy()
					end
					task.wait(3)
				end
			end)
		end)

		coroutine.resume(roamingCoroutine)

		v.Touched:Connect(function(touchingObj)
			local ifPlayer = false
			if touchingObj.Parent == player.Character then
				ifPlayer = true
			end

			if not ifPlayer then return end
			print("touching")

			local inside = true
			task.spawn(function()
				while inside do
					newNpc.Humanoid:MoveTo(hrp.Position)
					task.wait(0.5)
				end
			end)
			task.spawn(function()
				while true do
					if not table.find(workspace:GetPartsInPart(v), touchingObj) then
						inside = false
						coroutine.resume(roamingCoroutine)
						break
					end
					task.wait(0.2)
				end
			end)
		end)
	end)
	--[[repeat		
		if (originalPos - hrp.Position).Magnitude <= Range then
			newNpc.Humanoid:MoveTo(hrp.Position)
		else if roaming == false then
				newNpc.Humanoid:MoveTo(originalPos)
				if (newNpc.HumanoidRootPart.Position - originalPos).Magnitude < 2 then
					roaming = true
				end
			else if roaming == true then
					repeat
						newNpc.Humanoid:MoveTo((CFrame.new(originalPos) * CFrame.new(math.random(1,Range), math.random(1,Range), math.random(1,Range))).Position)
						if (originalPos - hrp.Position).Magnitude <= 30 then
							roaming = false
						else
							for i=0, 3, 0.5 do
								if (originalPos - hrp.Position).Magnitude > 30 then
									task.wait(0.5)
								end
							end
						end
					until roaming == false

				end
			end
		end
		task.wait(0.1)
	until player.Character == nil]]
end

Thats the whole code here is the main part with just the animation

task.spawn(function()
			local Animation = newNpc.Animation.AnimationId
			local newAnim = Instance.new("Animation")
			newAnim.AnimationId = Animation
			local playingAnim = newNpc.Humanoid.Animator:LoadAnimation(newAnim)

			newNpc.Humanoid.Running:Connect(function(speed)
				if speed > 0 then
					if not playingAnim.IsPlaying then
						playingAnim:Play()
					end
				else
					playingAnim:Stop()
				end
			end)
		end)

If you have any thoughts let me know.