Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i have it let me know when pathfinding is completed?

how do i have it print something when pathfinding is done

i have done this with tick() but it is just to messy to deal with

1 answer

With an example like the one on the next line, you could put your code after the for loop.

for _, waypoint in pairs(waypoints) do
	local part = Instance.new("Part")
	part.Shape = "Ball"
	part.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
 
	-- Move zombie to the next waypoint
	humanoid:MoveTo(waypoint.Position)
	-- Wait until zombie has reached the waypoint before continuing
	humanoid.MoveToFinished:Wait()
end

--Your code here

This discussion is preserved as it was. New answers, comments, and votes are closed.