Jump to content

math.randomseed()


Tekken

Recommended Posts

Hi I was wondering does putting 

math.randomseed(getTickCount());

 into one of my server side timer and one of the client side timers give me better math.random results? if not what will be the best way of using this for the best random results?

Link to comment
  • Discord Moderators

It will give you better results, as in the random numbers wont be the same each time you run the script.

But it wont make the Lua random generator better, it has a propensity for certain numbers and patterns like any pseudo-random number generator. If you need better randomness you can consider fetching numbers from random.org, they have an API.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...