# Lua math.random problem

**URL:** <https://forum.defold.com/t/lua-math-random-problem/19372>\
**Category:** Questions\
**Created:** [April 27, 2018, 2:54pm UTC](https://forum.defold.com/t/lua-math-random-problem/19372 "2018-04-27T14:54:51Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![AGulev](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/agulev/32/4541_2.png) [@AGulev](https://forum.defold.com/u/AGulev)\
**Post date:** [April 27, 2018, 3:18pm UTC](https://forum.defold.com/t/lua-math-random-problem/19372/2 "2018-04-27T15:18:42Z")

</div>

You have to use math.randomseed before math.random  
More info [here](https://forum.defold.com/t/problem-with-random/1227/3)

---

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