How do I make RNG?
id: 749599
category: Help with Scripts
posts: 5
Upauggfg12343nk
loading
so when I click the button, it will show roll a random item, they all have their own rarity: 1 in 2, 1 in 4, 1 in 100k, 1 in 1m, etc.
and I'm confused on how to script it, can someone help me?
and I'm confused on how to script it, can someone help me?
xavidoodleALT
loading
So like a poker machine roll type thing?
Upauggfg12343nk
loading
pretty much, no. You only can roll 1 at a time and it all depends on ur luck and what you'll get. So like a poker machine roll type thing?
It's pretty much like sol's rng in roblox
MakeGamsse
loading
you can do PICK RANDOM 1 to (however many) and if its = 1 then make it dopretty much, no. You only can roll 1 at a time and it all depends on ur luck and what you'll get. So like a poker machine roll type thing?
It's pretty much like sol's rng in roblox
but if its anything else then do pic krandom from however many for another roll e.g.
if its not that u can make more so yea
Eason_9
loading
You can do it with the pick random block:
Basically, the code picks a random number and it will detect if its equal to one, which creates a system to detect rarity of things. So, for example:
The code above will let the sprite go to the mouse pointer 1 in 10 times.
<(pick random (1) to (10)) = (1) > // This will return "true" 1 in 10 times.
<(pick random (1) to ((100) / (10))) = (1)> // This will return "true" 10% of the times.
Basically, the code picks a random number and it will detect if its equal to one, which creates a system to detect rarity of things. So, for example:
if <(pick random (1) to (10)) = (1) > then
go to [ mouse pointer v]
end
The code above will let the sprite go to the mouse pointer 1 in 10 times.