Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

Why is there always a certain order to randomization scripts in-game?

Asked by 8 years ago

I have a script that chooses a random number from 1 to 12,000, and every time in-game it picks the same number. Why is this?

1 answer

Log in to vote
4
Answered by
P100D 590 Moderation Voter
8 years ago
Edited 4 years ago

Built-in RNG is pseudo-random, and works off a preset seed. Random numbers generated using the same seed will be the same. To get new random numbers, change the seed using math.randomseed

See this wiki article for more info

0
Sadly your link doesnt work :/ personal_ly 151 — 8y
0
My bad, fixed. P100D 590 — 8y
Ad

Answer this question