My PathFindingNPC Works not as intended

So i have an NPC that uses pathfindingservice to move and i made a pathfinding script but the issue is when it walks it like moves stud by stud to the destination even tho i have given it the destination position correctly, im not sure what is the issue, there are no scripting errors it just works not as intended it moves in a way i dont want it to move, i printed the destination and the waypoint and they have a difference and im not sure why even tho i have given correct position.

More information: when it moves to the stud the script like restarts but still move to the same destination instead of moving on to another destination

   local PathfindingService = game:GetService("PathfindingService")
   local path = PathfindingService:CreatePath()
   path:ComputeAsync(root.position, Pos)
   local waypoints = path:GetWaypoints()

   for k, waypoint in pairs(waypoints) do

   	print("move")
   	walking = true
   	humanoid:MoveTo(waypoint.Position)


   	if waypoint.Action == Enum.PathWaypointAction.Jump then
   		humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
   	end

   	humanoid.MoveToFinished:Wait()
   	print("stop")
   	walking = false
   	executed = false
   	wait(2)
   	value.Value = false
   end

Set the network ownership of the NPC to blank or nil.
Side note: You should also check if the path is successful. Use if path.Status == Enum.PathStatua.Success then

The NPC Knows the path but it doesnot go to it correctly, it just like moves block by block to the path instead of going instantly to it so the path status is already a success it just goes there incorrectly.

Welp i found the issue and i solved so its alr now