I am learning pathfinding and I tried to make a brick(brick1) find the fastest way to get to another brick(brick2) and then start moving there and that works fine but if I move brick2 to another location with my cursor then brick1 has to finish going to where brick2 was before but I want it to just instantly go to where brick2 is.
while true do
path = game:GetService("PathfindingService"):ComputeRawPathAsync(game.Workspace.Start.Position, game.Workspace.End.Position, 200)
points = path:GetPointCoordinates()
for p=1,#points do
game.Workspace.Start.Position = points[p]
wait(.5)
end
wait(.01)
end
