You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? Keep it simple and clear!
I want to get a random value on a loop
- What is the issue? Include screenshots / videos if possible!
This is the first time I encounter this issue with math.random, I never had this problem before, so I have no idea why it bug for this loop specifically ?
- What solutions have you tried so far? Did you look for solutions on the Creator Hub?
Searched on internet, also added some timer, but the result didn’t changed.
Ok so my problem basically is, I have math.random that always return the same value
for i, v in pairs(GameTable["players"]) do
warn("PICKING A RANDOM NUMBER: "..math.random(1,1000).."")
InitPlayer(i, v.bot)
end
On the example above, the math.random(1,1000) returned 7 times in row the value “637”.
Everytimes I rerun this function, it give me 7 times the exact same number.
Isn’t this supposed to give me 7 different numbers ???