# How to create speed at random?

**URL:** https://forum.kirupa.com/t/how-to-create-speed-at-random/55733
**Category:** programming
**Created:** [June 27, 2004, 11:27am UTC](https://forum.kirupa.com/t/how-to-create-speed-at-random/55733 "2004-06-27T11:27:54Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![gt\_X\_lt](https://avatars.discourse-cdn.com/v4/letter/g/34f0e0/32.png) [@gt\_X\_lt](https://forum.kirupa.com/u/gt_X_lt)
#### Post date: [June 27, 2004, 11:27am UTC](https://forum.kirupa.com/t/how-to-create-speed-at-random/55733/1 "2004-06-27T11:27:54Z")

</div>

Hello.

I am trying to create a game where the ships coming towards you have a random speed of between 1-10.

Currently i only have this and this makes them all 10, how can i make this random 😃

```auto

onClipEvent(load)
{
 speedX = 10
}

```

Thank you
