Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to continue running functions?

Asked by 9 years ago

I'm having this issue where when a loops runs a function, the loop stops until the function is completed. What is the fix to this

function Run()
print 'run'
wait(5)
end

while wait() do
Run()
end

--Waits every 5 seconds to run the function rather than running it over and over
1
Probably a Co-routine, lmk if you need a full explaination, im not gr8 at co-routines but I could provide a brief explanation dragonkeeper467 453 — 9y

Answer this question