Hi, I am trying to make it so you have a 10% chance of a bonus round but my script doesn’t seem to be working.
local BonusRoundSelect = false
-- game loop
local ran = math.random(1,10)
if ran == 2 or 7 then
BonusRoundSelect = true
Status.Value = "BONUS ROUND"
else
BonusRoundSelect = false
end
print(BonusRoundSelect) -- for testing
print(ran) -- also for testing
-- after round finishes
BonusRoundSelect = false
what printed in the output after some testing:
11:49:59.639 true - Server - MainScript:61
11:49:59.640 2 - Server - MainScript:62
11:51:11.343 true - Server - MainScript:61
11:51:11.343 6 - Server - MainScript:62
11:51:54.238 true - Server - MainScript:61
11:51:54.238 9 - Server - MainScript:62
11:52:15.690 true - Server - MainScript:61
11:52:15.690 9 - Server - MainScript:62
11:52:36.893 true - Server - MainScript:61
11:52:36.894 9 - Server - MainScript:62
11:52:59.258 true - Server - MainScript:61
11:52:59.260 2 - Server - MainScript:62
11:54:07.492 true - Server - MainScript:61
11:54:07.493 10 - Server - MainScript:62
for some reason it’s never false…