|
| 19 Jan 2017 08:57 PM |
The problem with error is that it posts an error message. In scripts, you can do do return end to exit, but scripts are a bunch of functions that render this useless.
Just strip the error message off error() and you got yourself an exit. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 19 Jan 2017 09:21 PM |
Just stick with return end. If you need to run two loops at once, use the Spawn() function or some other method.
function loop1() while true do wait(1) print"loop1 is running" end end
Spawn(loop1)
while true do wait(1) print"loop2 is running" end
Output: loop1 is running loop2 is running loop1 is running loop2 is running loop1 is running loop2 is running loop1 is running loop2 is running
and whatnot.
|
|
|
| Report Abuse |
|
|
| |
|
|
| 19 Jan 2017 11:44 PM |
Misunderstood I guess,
exit() is for completely stopping a script. Having to return safely from the script requires way more work than just stopping execution. |
|
|
| Report Abuse |
|
|
| |
|
dardo99
|
  |
| Joined: 11 May 2013 |
| Total Posts: 525 |
|
|
| 21 Jan 2017 10:20 PM |
you can already stop a script with script.Active = false
Im equiped with https://www.roblox.com/library/305170648/ODer-Repellent |
|
|
| Report Abuse |
|
|
| |
|