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: Probability Tweaking

Previous Thread :: Next Thread 
evilishnessII is not online. evilishnessII
Joined: 26 Mar 2011
Total Posts: 10275
21 Jun 2014 05:28 PM
Is it possible, with math.random, to change the likelyhood of certain numbers returning?

Ie, if I had a line that said 'N = math.random(0, 360),' how would I make it so that the lower the number, the more likely it is to be chosen?
Report Abuse
iiEssence is not online. iiEssence
Joined: 18 Jun 2014
Total Posts: 3467
21 Jun 2014 05:30 PM
You can't, but you can:

if math.random(0,1) == 1 then
N = math.random(0,180)
else
N = math.random(0,360)
end
Report Abuse
evilishnessII is not online. evilishnessII
Joined: 26 Mar 2011
Total Posts: 10275
21 Jun 2014 06:16 PM
Thanks, that helps, actually. ^_^
Report Abuse
iiEssence is not online. iiEssence
Joined: 18 Jun 2014
Total Posts: 3467
21 Jun 2014 06:17 PM
I'm glad it did :)

I would appreciate it if you came to my place and donate some robux! Thanks!
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