Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can I keep a function running without using 'while true do' loops?

Is there a way to keep a code running? Without loops?

1 comment

0

you could use recursion if you dont like the idea of a loop

1 answer

✓ Accepted answer

If you're not a fan of loops that's fine there is still another approach. Its called recursion. What recursion is it is usually a function that calls itself.

example

function game()
	-- do stuff here
	if repeatProcess then
		game()
	end 
end

What that function will is call itself until you stop it.

hope this helps

1 comment

0

Aweeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeesome! Thank you :3!!

This discussion is preserved as it was. New answers, comments, and votes are closed.