# Random Movement

> Example Script: Random Movement

The example script, _Random Movement_ (_RandomMovement.cs)_, randomly moves a dynamic object around its starting position. Grab it from the download link at the end of this article.

Instructions

Here is a step-by-step guide to using the script:

1. Download the script file from the download link at the end of this article.
2. Follow the instructions provided in [Working with scripts](/scripting.md#guides) to upload the script and add it to an object.
3. Open the object's Properties panel and go to the Script Settings section. 
4. On the properties panel, set **IsDynamic** to **On**.
5. At the bottom of the object's properties panel is a Script Settings section. Upon looking at the Script Settings section for the _Random Movement_ script, you will see a list of parameters which you can set for the object. Setting values for these parameters can help you set your object's behavior.
6. Once you have finished setting the parameters for your object, your script is ready! Save and build your scene.
7. If you want to verify that the script is running correctly, visit your scene once it has finished building.

Script parameters

| ![Random movement script](/media/screenshot-pending.svg) |
| ------------------------------------------------------------------------------------------------------------------------------ |
| The parameters for Random Movement.                                                                                            |

| Speed | <p><em>Speed</em> allows you to set the speed of an object. The higher the value, the faster the object moves. </p><p>However, keep in mind that the speed is affected by the mass of the object. Make sure that the speed of your object is proportional to its mass. </p> |
| ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Chaos | _Chaos_ affects how the object changes course when it is hit. The _Chaos_ value should be set between 0.0 and 1.0. The higher it is, the more the object will change course.                                                                                                |
| Range | _Range_ determines how far an object will go from their starting position before it goes back to that starting point. _Range_ can be set at any value.                                                                                                                      |