Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make my NPC not pause when moving point to point?

Asked by 5 years ago
Edited 5 years ago

Every time my NPC reaches a point, it pauses, then moves. How do I make it just move without pausing?

while true do

local Path = PathFinding:FindPathAsync(Start.Position,End.Position)

NewPointFolder = Instance.new("Folder", workspace)

local Points = Path:GetWaypoints()

for i,v in pairs(Points) do
local Part = Instance.new("Part", NewPointFolder)
Part.Name = "BlobbyblobBuild_SomeDumbNinja"
Part.Anchored = true
Part.CanCollide = false
Part.Size = Vector3.new(1,1,1)
Part.Position = v.Position

Humanoid:MoveTo(v.Position)
if v.Action == Enum.PathWaypointAction.Jump then
Humanoid.Jump = true
end
Humanoid.MoveToFinished:wait()

end

OldPointFolder:Destroy()
OldPointFolder = NewPointFolder
game:GetService("RunService").Stepped:Wait()
end
0
Well, that's how pathfinding works. Every time the character moves to a point, it briefly stops then moves to the next point. If you really don't want this, you could use constant MoveTo() methods, but that is more complicated than pathfinding. DeceptiveCaster 3761 — 5y

Answer this question