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: Randomness?

Previous Thread :: Next Thread 
Jasonheart22 is not online. Jasonheart22
Joined: 13 Sep 2008
Total Posts: 1743
25 Jun 2014 03:34 PM
Is there a way to make a script decide whether to continue randomly?


Script:
~~~~~~~~
~~~~~~~~
~~~~~~~~
(randomly decide if the next line will run, or if script will end)
~~~~~~~~


That way, the very last line may or may not run.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
25 Jun 2014 03:35 PM
if math.random() < 0.5 then
--CONTINUE
else
--TERMINATE
end
Report Abuse
LightningfireNinja is not online. LightningfireNinja
Joined: 18 Sep 2011
Total Posts: 5941
25 Jun 2014 03:36 PM
Add


~~~~~~~~~~~
local x = math.random(1,2)
if x ~= 1 then
~~~~~~~~~~~


i think it'd work....
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