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
 

Re: math.random not actually random???

Previous Thread :: Next Thread 
Edslaw is not online. Edslaw
Joined: 03 Nov 2008
Total Posts: 145
08 Jul 2017 08:33 PM
i keep getting the same result over and over again even tho im using randomseed math.randomseed(tick())

pastebin of script:

/wwSWm5vB
Report Abuse
Chrounum is not online. Chrounum
Joined: 04 Apr 2015
Total Posts: 2911
08 Jul 2017 08:34 PM
nothing is ever random xd


this is a signature xd
Report Abuse
Edslaw is not online. Edslaw
Joined: 03 Nov 2008
Total Posts: 145
08 Jul 2017 08:44 PM
yes i know but it is possible to make it more random
Report Abuse
Chrounum is not online. Chrounum
Joined: 04 Apr 2015
Total Posts: 2911
08 Jul 2017 08:45 PM
if its not ever random tHEn yOu caNT mAke iT mORE rAndOM tHeN it Already is



this is a signature xd
Report Abuse
Dev_Tony is online. Dev_Tony
Joined: 26 Nov 2012
Total Posts: 5351
08 Jul 2017 08:47 PM
Is this code executed by the server or the client?
Report Abuse
WatermelonMan4676 is not online. WatermelonMan4676
Joined: 20 Jan 2014
Total Posts: 5516
08 Jul 2017 08:47 PM
don't set the randomseed, roblox already does this
Report Abuse
Edslaw is not online. Edslaw
Joined: 03 Nov 2008
Total Posts: 145
08 Jul 2017 08:49 PM
@dev in studio in a normal script in workspace
Report Abuse
WatermelonMan4676 is not online. WatermelonMan4676
Joined: 20 Jan 2014
Total Posts: 5516
08 Jul 2017 08:50 PM
yeah actually, I just tried both with and without randomseed and its completely random
Report Abuse
BJCarpenter is online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
08 Jul 2017 08:51 PM
Randomseed works for me. I get a random map every start. Yet I see this post everyday. You probably have a logic error.

There are other ways.

If you happen to have human input, you can use that to randomly pull from the list, which is constantly being pulled from. That is how a casino slot machine does it.

so in the background, a loop should always running, and pulling from the list:

while wait(.1) do
a = math.random()
end


Report Abuse
Edslaw is not online. Edslaw
Joined: 03 Nov 2008
Total Posts: 145
08 Jul 2017 08:51 PM
/GdB5Reu1 [pastebin]

i keep getting the same result (52)
Report Abuse
WatermelonMan4676 is not online. WatermelonMan4676
Joined: 20 Jan 2014
Total Posts: 5516
08 Jul 2017 08:52 PM
pastebin/eDZzm833
Report Abuse
WatermelonMan4676 is not online. WatermelonMan4676
Joined: 20 Jan 2014
Total Posts: 5516
08 Jul 2017 08:52 PM
oh wait I just removed the randomseed, but removing it worked in output
Report Abuse
complexo is not online. complexo
Joined: 07 Jan 2009
Total Posts: 1547
08 Jul 2017 08:53 PM
Normally, your game should never run math.randomseed more than once.
It appears that the last random number generated is used as a seed for the next random number (math.random(low, high) uses a normal math.random() number, which is used as the seed), and seeds are global.

Even if the seed is changed serverside, a LocalScript run by the client will use that new seed.
Report Abuse
Dev_Tony is online. Dev_Tony
Joined: 26 Nov 2012
Total Posts: 5351
08 Jul 2017 08:59 PM
Check out this pastebin: /4EJfznxJ
Report Abuse
Edslaw is not online. Edslaw
Joined: 03 Nov 2008
Total Posts: 145
08 Jul 2017 09:02 PM
@dev


i keep getting 52 over and over again
Report Abuse
Edslaw is not online. Edslaw
Joined: 03 Nov 2008
Total Posts: 145
08 Jul 2017 09:11 PM
now 68 lol
Report Abuse
Edslaw is not online. Edslaw
Joined: 03 Nov 2008
Total Posts: 145
08 Jul 2017 09:18 PM
1
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