Slower Humanoids Touch The Part From Further Away?

In my tower defense game, I have a script that loops through waypoints on the path and moves the humanoid to them. This all works fine… until you get to slower zombies. For some strange reason, slower humanoids can touch the part from further away! I have a video attached where you can see this. Can someone help fix this issue?

The code:

  1. function mob.Move(mob, map)
    • local humanoid = mob:WaitForChild(‘Humanoid’)*
    • local points = map.Points*
    • for point=1, #points:GetChildren() do*
    •    if point <= 10 then*
      
    •    	humanoid:MoveTo(points[point].Position)*
      
    •    	humanoid.MoveToFinished:Wait()*
      
    •    else*
      
    •    	break*
      
    •   end*
      
    • end*
    • mob:Destroy() *
  2. end

Video:

3 Likes

UPDATE: I have found the issue, and have made a fix. Turns out roblox automatically gives up when it takes a humanoid more than 8 seconds to reach the part. I simply had to add more waypoint parts inbetween, however this now brings up another issue. This is less gamebreaking, but still really annoying!!! For some reason, when there are alot of waypoints, there is a slight delay in movement every time the humanoid reaches a waypoint. For like a millisecond the humanoid stops before continuing walking. Its really annoying and takes away from the smoothness. Does anyone know if there is any other solution to this issue without adding more waypoints?

2 Likes

SOLVED! I simply set the zombie’s network owner to nil after it spawns and it stops the annoying pause! Now its all smooth!

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.