How to make a coroutine stop, and then resume again? I do not know why but after the coroutine stops, it breaks the while true do.
local leaderstats = coroutine.wrap(function()
while wait(0.03125) do
--My code
end
end)
while true do
leaderstats() -- Resumes coroutine
--My code
wait(4)
leaderstats() -- Stops coroutine
--My code
wait(4)
end
Thanks!

1 comment
It is usually unwise to mix coroutine and wait()