# Simple but confused

**URL:** <https://forum.kirupa.com/t/simple-but-confused/86193>\
**Category:** Uncategorized\
**Created:** [April 11, 2005, 1:55am UTC](https://forum.kirupa.com/t/simple-but-confused/86193 "2005-04-11T01:55:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gmftballa](https://avatars.discourse-cdn.com/v4/letter/g/7ab992/32.png) [@gmftballa](https://forum.kirupa.com/u/gmftballa)\
**Post date:** [April 11, 2005, 1:55am UTC](https://forum.kirupa.com/t/simple-but-confused/86193/1 "2005-04-11T01:55:15Z")

</div>

Ok well i have a simple money script [for my game] and i want to say, ok when i walk over a coin, i want it to add $5 to the total amount of money, but the problem is, is that my code doesnt work,  
in the frame actions i have:

```auto
money = 0;

```

and in the hitTest for the coin i have:

```auto
if (_root.dude.hitTest(_root.coin) {
		_root.money +1
	}

```

If im doing something wrong, can someone point it out, it would be much appreciated.  
Thank You In Advance. 🙂
