I have NPCs that walk to points using MoveTo()
When the MoveToFinished event is called, a loop makes the NPC walk again
local character = self.model
local humanoid: Humanoid = character.Humanoid
local points = Map.Important.Path.Walkpoints
local numberOfPoints = #points:GetChildren()
for i = 1, numberOfPoints, 1 do
local point
if i == 1 then
point = points.PointStart.Position
elseif i == numberOfPoints then
point = points.PointFinish.Position
else
point = points["Point"..i].Position
end
humanoid:MoveTo(point)
humanoid.MoveToFinished:Wait()
print('Got') -- Called late
end
https://gyazo.com/ab93c17fbf64598849b2bd2436877628
In this video you can see the slight delay moving from one point to another
The weird thing is that sometimes it delays and sometimes it doesnt