Hello, I am making 15-20 NPCs walk randomly between points. But, after a few seconds, the movements get less smooth and jittery.
Code
for i, point in pairs(waypoints) do
script.Parent:MoveTo(point.Position + Vector3.new(0,3,0))
local move = false
script.Parent.MoveToFinished:Connect(function()
move = true
end)
script.Parent.MoveToFinished:Wait()
end
Any help is appreciated thanks

2 comments
Consider using Humanoid.WalkToPoint instead.
Since you are already waiting for the event to fire on line 7, connecting to the event is kinda redundant.