Hello. I’m using this as the following for a chance:
local secretChance = math.random(1, 1000000000)
if secretChance == 1 then
winner = 10760425;
game.ReplicatedStorage.Chat:FireAllClients(player.Name .. ' has unboxed a secret item! The Staff of Sparks! (0.000000001' .. '%)','SourceSansBold')
end
Is there a more accurate way to get the chances I want?
You could use Random.new():NextNumber(1, 1000000000) though I haven’t used it myself so I’m not sure if this will work, but you can give it a try and let me know.
If you wanted a RREEALLLY precise number, you could use this:
local number = 200
print(Random.new() * number)
--Random.new creates a random number inbetween 1 and 0 as a float.
--Integer is what it is being multiplied by, as our limit.
local number = 200
print(Random.new():NextNumber() * number)
--Random.new creates a random number inbetween 1 and 0 as a float.
--Integer is what it is being multiplied by, as our limit.
--Example output: 195.1827561742793...