NPC stops when it reaches its destination, even when it's next destination is set immediately

The script that makes the NPC move is as follows:

wait(0.2)
while true do
	
	local pathfindingservice = game:GetService("PathfindingService")

	local humanoid = script.Parent.Humanoid
	local Spider = script.Parent.Spider.Position

	local path = pathfindingservice:CreatePath({AgentCanJump = false})

	local part = game.Players[script.Parent.PlayerToFollow.Value].Character.HumanoidRootPart.Position
	

	path:ComputeAsync(Spider,part)
	local waypoints = path:GetWaypoints()


	humanoid:MoveTo(waypoints[#waypoints].Position)
	humanoid.MoveToFinished:Wait()

	

end

Basically, it follows the closest player. However, it stops periodically, seemingly when it reaches it’s destination:
https://gyazo.com/219732ef1b4d262d5ac3774583390c9c
Then, after a few seconds, it resumes it’s path towards the player, and once it reaches the player, it stops again.

Removing the .MoveToFinished and adding a wait(0.2) in place of it seemed to work, but I’m not sure if it’s the best solution…