# Need to move player what was rolled on the dice

**URL:** <https://forum.kirupa.com/t/need-to-move-player-what-was-rolled-on-the-dice/311443>\
**Category:** Uncategorized\
**Created:** [July 6, 2010, 8:30pm UTC](https://forum.kirupa.com/t/need-to-move-player-what-was-rolled-on-the-dice/311443 "2010-07-06T20:30:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![matt035](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@matt035](https://forum.kirupa.com/u/matt035)\
**Post date:** [July 6, 2010, 8:30pm UTC](https://forum.kirupa.com/t/need-to-move-player-what-was-rolled-on-the-dice/311443/1 "2010-07-06T20:30:09Z")

</div>

so i have 2 dices and the code for them are

function rand(a:Number, b:Number){  
var del:Number = b-a;  
var num:Number = Math.round((Math.random()\*del)+a);  
return num;  
}

test.onRelease = function(){  
var num = rand(1,6);  
die1.gotoAndStop(num);  
die1.\_rotation = rand(0,360)  
die1\_text = "Die 1’s Value is: "+num;

```
var num = rand(1,6);
die2.gotoAndStop(num);
die2._rotation = rand(0,360);
die2_text = "Die 2's Value is: "+num;

```

}

and i want to know how do i make somthing move to the number thrown on the dice ?
