generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: A way of stopping a function?

Previous Thread :: Next Thread 
badfitz99 is not online. badfitz99
Joined: 01 May 2010
Total Posts: 5854
22 Jun 2014 08:43 AM
Let's say I have a script that checks if all players are dead (using a boolean). When they're all dead it restarts the main function. Is there a way to stop the function where it is?
Report Abuse
MasterDaniel is online. MasterDaniel
Joined: 28 Nov 2008
Total Posts: 2866
22 Jun 2014 08:45 AM
Not sure if it is what you want, but adding "break" ends the function
Report Abuse
badfitz99 is not online. badfitz99
Joined: 01 May 2010
Total Posts: 5854
22 Jun 2014 08:46 AM
Could I use a coroutine?
Report Abuse
MasterDaniel is online. MasterDaniel
Joined: 28 Nov 2008
Total Posts: 2866
22 Jun 2014 08:49 AM
I've not really used coroutines so I couldn't say sorry
Report Abuse
ajmhm1111 is not online. ajmhm1111
Joined: 22 Jun 2013
Total Posts: 164
22 Jun 2014 08:54 AM
@MasterDaniel

break does not end functions, only loops.

--ajmhm1111
Report Abuse
MasterDaniel is online. MasterDaniel
Joined: 28 Nov 2008
Total Posts: 2866
22 Jun 2014 09:06 AM
oh mybad. It ends functions in vb.NET and I don't really use it in Lua xD
Report Abuse
MasterDaniel is online. MasterDaniel
Joined: 28 Nov 2008
Total Posts: 2866
22 Jun 2014 09:08 AM
oh actually it doesn't :p, its "Exit Function" in vb.NET.
Anyway all I could think of was break, sorry I couldn't help
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image