I want to make a for loop wait for an event to fire before executing the code in it again. In the code block below is basically what I want.
for i,v in pairs(t) do
thing:DoTheThing(v)
(Wait for event to fire)
end
(Note: This isn't the full code, this is only the loop)
In case you're curious or have any alternate solution, this is for pathfinding to a certain location using the pathfinding service.
How would I go about this sort of thing?
