# Problem with Random!

**URL:** <https://forum.defold.com/t/problem-with-random/1227>\
**Category:** Questions\
**Created:** [March 20, 2016, 11:13pm UTC](https://forum.defold.com/t/problem-with-random/1227 "2016-03-20T23:13:57Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Pkeod](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pkeod/32/606_2.png) [@Pkeod](https://forum.defold.com/u/Pkeod)\
**Post date:** [March 21, 2016, 5:00am UTC](https://forum.defold.com/t/problem-with-random/1227/3 "2016-03-21T05:00:12Z")

</div>

Like Ragnar said you can do this once before you use math.random

math.randomseed(os.clock()\*100000000000)

However to get really good random numbers you’ll want to use something like

> <https://gist.github.com/anonymous/9030f9045ef8c3e52dff>

[@admins](https://forum.defold.com/groups/admins) can we get .lua files approved for upload?

---

_[View the full topic](https://forum.defold.com/t/problem-with-random/1227)._
