# Please help! Random()

**URL:** <https://forum.kirupa.com/t/please-help-random/2755>\
**Category:** flash\
**Created:** [April 20, 2002, 10:09am UTC](https://forum.kirupa.com/t/please-help-random/2755 "2002-04-20T10:09:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 20, 2002, 10:09am UTC](https://forum.kirupa.com/t/please-help-random/2755/1 "2002-04-20T10:09:54Z")

</div>

I’m getting in trouble with this random() function!\rI have a random() action on the first frame of a MC and on another I have a if statement that checks the random() action.\r\rFrame 1:\rsomething = random(5);\r\r\rFrame 10:\rif (something==2){\rdo action\r}\r\rThis isn’t working, what am I doing wrong???

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 20, 2002, 11:38am UTC](https://forum.kirupa.com/t/please-help-random/2755/2 "2002-04-20T11:38:13Z")

</div>

Nevermind, it’s working…
