IanVIII
|
  |
| Joined: 03 Apr 2016 |
| Total Posts: 535 |
|
|
| 25 Jun 2016 08:31 AM |
local PrimaryNoiseNumber = math.random(50,250) print("Terrain Number: "..PrimaryNoiseNumber)
For some reason, whenever I run the script, I get the number 227. Can someone please explain this to me? |
|
|
| Report Abuse |
|
|
IanVIII
|
  |
| Joined: 03 Apr 2016 |
| Total Posts: 535 |
|
|
| 25 Jun 2016 08:33 AM |
| It's doing the same thing when I change the numbers, I got 136 when I changed 250 to 260 |
|
|
| Report Abuse |
|
|
|
| 25 Jun 2016 09:16 AM |
(Haven't learnt a lot of scripting in forever but)
It could be that you need to create a new IntValue, and then make that IntValue have the random number.
Join the unofficial game design group, https://www.roblox.com/My/Groups.aspx?gid=2862545 |
|
|
| Report Abuse |
|
|
|
| 25 Jun 2016 09:30 AM |
math.randomseed(math.random(os.time()))
put that as ur first line |
|
|
| Report Abuse |
|
|
|
| 25 Jun 2016 09:41 AM |
@above
Why we he need to have the person's pc time?
It makes no sense.
Join the unofficial game design group, https://www.roblox.com/My/Groups.aspx?gid=2862545 |
|
|
| Report Abuse |
|
|
|
| 25 Jun 2016 09:42 AM |
correction:
date and time.
Join the unofficial game design group, https://www.roblox.com/My/Groups.aspx?gid=2862545 |
|
|
| Report Abuse |
|
|
IanVIII
|
  |
| Joined: 03 Apr 2016 |
| Total Posts: 535 |
|
|
| 25 Jun 2016 09:44 AM |
It worked, but I need it to get a number between 50 and 250 When I try and do the same again, it would generate a different number but it would still be the same every time I run it. |
|
|
| Report Abuse |
|
|