if I were to do something like
local function test() while true do print("testing") wait() end end
what would be a way I could make the function stop? so it doesn't call the function and stops printing
Before I answer, it would be helpful to put your code in Lua, instead of typing it out.
So regarding your question, you can use "break" to stop while true do loops. E.g.
1 | local function test() |
2 | while true do |
3 | print ( "testing" ) |
4 | break |
5 | end |
6 | end |
If you have any problems please comment on this post.