math.random with tables seems to be giving similar number after picked?
I have a round-based game I was working on and sometimes you can get special rounds. I pick them out using this:
1 | Chance = { 1 , 2 , 3 , 4 , 5 } |
2 | Choice = (Chance [ math.random(#Chance) ] ) |
Although lets say "Choice" happens to be 2. If it picks 2, it seems like it picks 2 more often for a few turns. If it were to pick one, it'd pick one more often for a few turns. I was wondering if there was a better way to do this or if I just happened to be getting the same number a few times in a row.