Hello! I have a list that I want to pick a random vehicle from the list and print it but I end up getting the same vehicle when I run the game. How can I make this truly random?
while true do
math.randomseed(tick())
local Common = {"Car","AnotherCar","BigCar","MinivanCar","RatherLargeCar"}
local randomchoice = Common[math.random(5)]
print(randomchoice)
wait(0.5)
end

7 comments
Try this: "math.randomseed(tick()) math.random()" Keep those together. It makes it really random, at least for me.
On which line?
Under the while loop, so Line 2.
I wouldn't recommend putting it in the loop; Seems unsafe.
Put it outside the loop. It might be that you are defining the seed right before using it, so you always generate the same number.
You all helped me answer it. Thanks! Also, if anyone just wants some rep, just submit an answer so I can accept.
Heads up! Right now, it seems that there's going to be a change to the function: https://devforum.roblox.com/t/a-random-feature/64517