Pathfinding not working properly

Trying to get pathfinding into this Zombie but it dosen’t want to follow the path, I can see that the waypoints are generated right but the Zombie dosen’t want to follow them but walk the shortest path to me.

RobloxScreenShot20211110_212808082

local PathFindingS = game:GetService("PathfindingService")
local Player = game:GetService("Players")
local to = PathFindingS:CreatePath()

local aggroDistance = 500

wait(2)

while true do
	wait()
	for i,v in pairs(game.Players:GetChildren()) do
		print(v.Name)
		local Wait_Target_Root = v.Character:WaitForChild("HumanoidRootPart")
		if v.CharacterAdded and Wait_Target_Root then
			if (script.Parent.UpperTorso.Position-v.Character.Torso.Position).magnitude < aggroDistance and v.Character.Humanoid.Health ~= 0 then
				to:ComputeAsync(script.Parent.UpperTorso.Position, v.Character.Torso.Position)
				local waypoints = to:GetWaypoints()
				if to.Status == Enum.PathStatus.Success then
					for q,w in pairs(waypoints) do
						local part = Instance.new("Part")
						part.Shape = "Ball"
						part.Material = "Neon"
						part.Size = Vector3.new(0.6, 0.6, 0.6)
						part.Position = w.Position + Vector3.new(0,2,0)
						part.Anchored = true
						part.CanCollide = false
						part.Parent = game.Workspace

						if w.Action == Enum.PathWaypointAction.Jump then
							script.Parent.Zombie.Jump = true
						end

						script.Parent.Zombie:MoveTo(w.Position)
						print(w.Position)
					end
				end
			end
		end
	end
end