# Remove MovieClip Hittest not working

**URL:** <https://forum.kirupa.com/t/remove-movieclip-hittest-not-working/279834>\
**Category:** Uncategorized\
**Created:** [January 19, 2009, 8:54pm UTC](https://forum.kirupa.com/t/remove-movieclip-hittest-not-working/279834 "2009-01-19T20:54:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Santa\_Clause](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@Santa\_Clause](https://forum.kirupa.com/u/Santa_Clause)\
**Post date:** [January 19, 2009, 8:54pm UTC](https://forum.kirupa.com/t/remove-movieclip-hittest-not-working/279834/1 "2009-01-19T20:54:34Z")

</div>

Hey peoples,

I’m working on this top down game where some guy has to collect coins.  
Thing is, for example I got 2 frames, and they both got coins in em, when you walk to the 2nd room and grab all the coins, and go back to the first room the coins respawned in both rooms.

```auto
onClipEvent (enterFrame) {
	if (_root.survivor.hitTest(this)) {
		_root.money++;
		this.removeMovieClip();

	}
}

```

That line of code is attached to a coin which is outside the Frame.

```auto
duplicatemovieclip("money2_mc", "money3_mc", 1);
        setProperty ("money3_mc", _x, "200");

```

And that line of code is attached to the frame actionscript.  
I can’t seem to use that script twice, any idea of how I could pull this off?

Thanks in advance!

-Santa
