I have made a script that when a button is pressed (for testing purposes) it generates a random number between 1 and 100 and then identifies it, is this a fair way to make a system like this as if the number is random each has a 1 in 100 chance of being pulled?, i was wondering as why do games use percentage if they could do this? Many regards, THELFCMAN
script.Parent.MouseButton1Click:Connect(function()
---- This is going to be the math.random to get a number between 1 to 100, each is different raritites
local number = math.random(1, 100)
print(number)
if number <60 then --- Common
print("Common")
elseif number == 61 or number >60 and number<85 then print("Uncommon")
elseif number == 85 or number >85 and number<95 then print("Rare")
elseif number == 95 or number >95 then print("Legendary")
end
end)

2 comments
im gonna add a mythical too lol, like 0.5% chance
Not sure what you mean by "why do games use percentage if they could do this", that is what your doing just with a diffrent number format.