Hello all!
I'm scripting a rather large game, but for one portion of it, I need to have a 'rounds' script running:
while true do
local roundtime = 500
for i = roundtime, 0, -1 do
if i == 0 then
-- Do Stuff
end
I'm trying to make my game as memory efficient as I can, and I've found that while true do scripts tend to add MB to the memory usage, this particular one by itself adds 50-75MB of memory on desktop computers.
Question - Is there a better way to utilize a 'rounds' script than while true do, that's more memory efficient?
Thanks!

3 comments
seems fine to me. you're looping for a reason and it's not needless comparisons as far as I know
im.not really that experienced but couldn't you use a module script and call it whenever you want?
While true do loops adds to the memory use, trying to trim as much as I can. :)