# Problem with scores! it won't stop incrementing while being hit by an object!

**URL:** <https://forum.kirupa.com/t/problem-with-scores-it-wont-stop-incrementing-while-being-hit-by-an-object/327068>\
**Category:** Uncategorized\
**Created:** [February 3, 2012, 6:14pm UTC](https://forum.kirupa.com/t/problem-with-scores-it-wont-stop-incrementing-while-being-hit-by-an-object/327068 "2012-02-03T18:14:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joptionpane](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@joptionpane](https://forum.kirupa.com/u/joptionpane)\
**Post date:** [February 3, 2012, 6:14pm UTC](https://forum.kirupa.com/t/problem-with-scores-it-wont-stop-incrementing-while-being-hit-by-an-object/327068/1 "2012-02-03T18:14:17Z")

</div>

[SIZE=2][FONT=courier new]hi! i have a problem creating scores in my game. how can i stop it from incrementing +1?  
my code is this…

```auto

if(this.hitTest(_root.myObj._x, _root.myObj._y, true))
{
    unloadMovie(_root.myObj);
    _root.score += 1;
}

```

the _this_ is the “goal” of my game. if \*myObj \*hit it, the score must increment JUST ONE. and even though i added the code _unloadMovie(\_root.myObj)_, it still wont stop incrementing! how can i fix this?

thanks in advance! [/FONT][/SIZE]
