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
With an example like the one on the next line, you could put your code after the for loop.
01 | for _, waypoint in pairs (waypoints) do |
02 | local part = Instance.new( "Part" ) |
03 | part.Shape = "Ball" |
04 | part.Material = "Neon" |
05 | part.Size = Vector 3. new( 0.6 , 0.6 , 0.6 ) |
06 | part.Position = waypoint.Position |
07 | part.Anchored = true |
08 | part.CanCollide = false |
09 | part.Parent = game.Workspace |
10 |
11 | -- Move zombie to the next waypoint |
12 | humanoid:MoveTo(waypoint.Position) |
13 | -- Wait until zombie has reached the waypoint before continuing |
14 | humanoid.MoveToFinished:Wait() |
15 | end |
16 |
17 | --Your code here |