I took a look about what you just explained. It works for me now! Thank you so much!
Lol thats what I was saying!
Hope you get it now OP and gl with that RNG.
If you need any more explanation, come to me
I know I’m very late but to get a random rarity this is a very simple way to do it
local rarity = {
Legendary = {1,2},
Epic = {3,10},
Uncommon = {11,40},
Common = {41,100}
}
for i = 1,100 do
local rand = math.random(1,100)
for i, v in pairs(rarity) do
if rand >= v[1] and rand <= v[2] then
print(i)
end
end
end
Big numbers through math. Random don’t really get supported compared through the method I showed. Although this can be useful in the smaller rarity games, for something like a solely RNG bigger numbers are needed.
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.