So i know while true does,Heres an example
while true do wait() print("Hi Mom") end
But what if i want it to repeat itself? Like re-start. I know theres the "break",Is there something similiar but "repeat"?
edit: Was wrong. Edited the answer to fit better. It seems that I was incorrect, many apologies.If you read the comments, wait() holds the wait for the smallest time interval. This should repeat it correctly. As for breaking a while true do loop, simply type break whenever you wish inside of it, and it will stop it. The most practical use for break is when you are doing a conditional branch where you have different If statements and different loops for each one of them. For restarting a loop, the break command will come into use. What you would do is use If statements and breaks. (There are many alternatives, but this would be the simplest way, I believe.)
Here is an example.
while true do wait() print 'Hi mom!' canchange = false --here you can either have an outside force change the variable, or already have it set to true and have waits to time it. if canchange = true then break while true do print 'Hi dad!' end end