# Set Score

**URL:** <https://forum.kirupa.com/t/set-score/112212>\
**Category:** Uncategorized\
**Created:** [June 4, 2004, 8:29pm UTC](https://forum.kirupa.com/t/set-score/112212 "2004-06-04T20:29:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yhack](https://avatars.discourse-cdn.com/v4/letter/y/3da27b/32.png) [@yhack](https://forum.kirupa.com/u/yhack)\
**Post date:** [June 4, 2004, 8:29pm UTC](https://forum.kirupa.com/t/set-score/112212/1 "2004-06-04T20:29:51Z")

</div>

i hav a dynamic text box with a variable name of total

how do i make it so it ses 0 before you start  
then when things hittest it adds 1 to the score

for 0 before you start i though:

```auto
_root.total = 0;

```

and for +1 everytime

```auto
if (bullet.hitTest(enemy)) {
	_root.total = _root.total + 1;
}

```

the first 1 dousnt work but i havent tried the second so would it work?
