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 comment

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