I have been trying to get AI working for almost a year and I always stop working on it because of this problem.
The AI follow the path but always about halfway through the path they start to stutter basically.
I have a gif of whats happening. At the end of the gif you can see he moves again. They start moving to the next point every couple of seconds and I have no clue why they do this.
Heres a link to the gif https://gyazo.com/4a3be5f9a0d1c2ba1ee9ff063f4de0f3
Heres my code
function MouseButton1Clicked()
if Mouse.Target ~= nil then
local Path = PathfindingService:CreatePath()
Path:ComputeAsync(workspace.Dummy:GetPrimaryPartCFrame().Position, Mouse.Hit.Position)
local PathWaypoints = Path:GetWaypoints()
wait(1)
for _, waypoint in pairs(PathWaypoints) do
local part = Instance.new("Part")
part.Material = Enum.Material.Neon
part.Size = Vector3.new(0.6, 0.6, 0.6)
part.Position = waypoint.Position
part.Anchored = true
part.CanCollide = false
part.Parent = game.Workspace
workspace.Dummy.Humanoid:MoveTo(waypoint.Position)
workspace.Dummy.Humanoid.MoveToFinished:Wait()
end
end
end
Mouse.Button1Up:Connect(MouseButton1Clicked)
Does anyone have any ideas? Is is the model I am using?? I have no clue what the problem is. Anyway thanks and have a good one.
