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 » Scripters
Home Search
 

anything more random than math.random()?

Previous Thread :: Next Thread 
robloxplayerboy101 is not online. robloxplayerboy101
Joined: 11 May 2012
Total Posts: 562
09 Aug 2016 05:09 AM
it seems to put priority to higher numbers.


Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
09 Aug 2016 05:11 AM
use math.randomseed(tick()) at the top of your script
Report Abuse
robloxplayerboy101 is not online. robloxplayerboy101
Joined: 11 May 2012
Total Posts: 562
09 Aug 2016 05:12 AM
will that affect math.random(1818,475388269)? this is for a random place teleporter.


Report Abuse
Knightofnight05 is not online. Knightofnight05
Joined: 03 May 2014
Total Posts: 345
09 Aug 2016 07:05 AM
No
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
09 Aug 2016 08:49 AM
"it seems to put priority to higher numbers."
No it doesn't. It looks that way, but it doesn't. It puts priority to higher DIGITS, not numbers.

A number with 10 digits has 900 million possibilities. A number with 5 digits has only 90 thousand possibilities. See why it would favor a 10 digit number over a 5 digit number?


Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
09 Aug 2016 08:57 AM
For an example that is easier to understand (especially showing work), think of this.
A one digit number ranges from 1 to 9. I'll leave out a plain "0" because it's not needed to understand. A two digit number ranges from 10 to 99.

1 to 9 includes 9 numbers.
10 to 99 includes 90 numbers.
100 to 999 includes 900 numbers.

That puts the total possibilities for a number between one and three digits at 999.

900/999 = ~90% of this will be three digit numbers.
90/999 = ~9% will be two digit numbers.
9/999 = ~0.9% will be a single digit.


Report Abuse
Flux_Capacitor is not online. Flux_Capacitor
Joined: 07 Apr 2008
Total Posts: 45720
09 Aug 2016 09:45 AM
#logic
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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