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.
local function test() while true do print("testing") break end end
If you have any problems please comment on this post.