Having troubles with probabilities

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
  • I want to make a probability system based on a value a player has (basically luck)
  1. What is the issue? Include screenshots / videos if possible!
  • The problem is eventually the probability gets to like 1/0.87 or like 1/0.66 and I don’t know how to handle probabilities like that
  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
  • I can’t seem to find any help to this, I’ve searched for like 10 minutes
1 Like

These are some examples

local rng = math.random(1, 1000)
if rng == 1 then --1 in 1000
    print("wow so rare (0.1% chance)")
end
local rng = math.random(1, 10000)
if rng == 1 then --1 in 10000
    print("wow so so rare (0.01% chance)")
end

1 in 10 is 10%
1 in 100 is 1%
1 in 1000 is 0.1%
1 in 10000 is 0.01%
1 in 100000 is 0.001%

Cart before the horse problem. Cart is increasing positive results (luck), horse is your probability system (random generator). Need details about what you’re generating and how before you can start thinking about adding luck into the equation.

1 Like