# Random coin placement

**URL:** <https://forum.kirupa.com/t/random-coin-placement/144325>\
**Category:** Uncategorized\
**Created:** [April 13, 2005, 1:21pm UTC](https://forum.kirupa.com/t/random-coin-placement/144325 "2005-04-13T13:21:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![i\_need\_help](https://avatars.discourse-cdn.com/v4/letter/i/bb73d2/32.png) [@i\_need\_help](https://forum.kirupa.com/u/i_need_help)\
**Post date:** [April 13, 2005, 1:21pm UTC](https://forum.kirupa.com/t/random-coin-placement/144325/1 "2005-04-13T13:21:40Z")

</div>

i only want one coin on my screen at a time, but once i pick it up i need another coin to appear in a random place on the screen. Can anybody tell me how to modify my code to do this?

this is my code:

onClipEvent (load) {  
this.stop();  
}  
onClipEvent (enterFrame) {  
if (this.hitTest(\_root.car)) {  
this.gotoAndStop(2);  
\_root.score +=1;  
}  
}
