I made a bot that kinda just... runs towards you. But every five seconds it has to stop to update its pathfinding navigation thingy. Can anyone help me improve this script so that the bot stops less?
while true do local path = game:GetService("PathfindingService"):ComputeSmoothPathAsync(script.Parent.Torso.Position, game.Workspace:WaitForChild("DaBrainlessOne").HumanoidRootPart.Position, 100) local points = path:GetPointCoordinates() script.Parent.Parent.Points:ClearAllChildren() for p = 1, #points do part = Instance.new("Part") part.CanCollide = false part.Size = Vector3.new(1,1,1) part.Position = points[p] part.Anchored = true part.Transparency = 0.5 part.Parent = script.Parent.Parent.Points script.Parent.Humanoid:MoveTo(part.Position) script.Parent.Humanoid.MoveToFinished:Wait() end print(path.Status) end