local x = math.random(5)
print(x)
when i put this in onStartup() (globalevents/startup.lua), always results 3.
when i put "math.random(10)", always results 6.
this is a bug?
Have you tried setting the seed before using math.random()?
math.randomseed(os.time())
it worked, thanks!
Only one doubt, what is the purpose of this random?
Thank you =)
Every time you start the server the random seed would be different so the random numbers aren't always the same. That's what happens when you choose time as the random seed. It's for increasing unpredictability.
Thank you @Tarliton =)