|
| 24 May 2015 01:27 PM |
| How would you make a while loop restart to the beginning without carrying out the rest of the script in the loop? |
|
|
| Report Abuse |
|
|
|
| 24 May 2015 01:28 PM |
Use 'if' statements to compartmentalize the code.
-𝒩 | Anticodist, Scripter |
|
|
| Report Abuse |
|
|
|
| 24 May 2015 01:46 PM |
nvm, it was a lot more simple than i thought.
if anyone else is wanting to do the same thing:
function loop() --loop here end
function restart() loop() end |
|
|
| Report Abuse |
|
|
|
| 24 May 2015 01:47 PM |
You realize neither of those are loops, right?
-𝒩 | Anticodist, Scripter |
|
|
| Report Abuse |
|
|
|
| 24 May 2015 01:47 PM |
| Using restart() is literally the exact same thing as doing loop(). |
|
|
| Report Abuse |
|
|
pketny
|
  |
| Joined: 27 Dec 2010 |
| Total Posts: 1162 |
|
|
| 24 May 2015 01:49 PM |
After calling restart() in the loop the loop will continue from that point. Just use if statements. If you are not sure how to use those properly, please follow these series of tutorials: http://wiki.roblox.com/index.php?title=AllTutorials#Scripting |
|
|
| Report Abuse |
|
|
|
| 24 May 2015 02:05 PM |
| You know your code, once that loop finishes; the rest would continue from where they left off. |
|
|
| Report Abuse |
|
|