# Game healthbar

**URL:** https://forum.kirupa.com/t/game-healthbar/57626
**Category:** flash
**Created:** [July 14, 2004, 7:37pm UTC](https://forum.kirupa.com/t/game-healthbar/57626 "2004-07-14T19:37:11Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![FlyBoy6](https://avatars.discourse-cdn.com/v4/letter/f/65b543/32.png) [@FlyBoy6](https://forum.kirupa.com/u/FlyBoy6)
#### Post date: [July 14, 2004, 7:37pm UTC](https://forum.kirupa.com/t/game-healthbar/57626/1 "2004-07-14T19:37:11Z")

</div>

i cant seem to get this to work this is the code on the enemy

onClipEvent (load) {  
damage = 3;  
}  
onClipEvent (enterFrame) {  
if (this.hitTest(\_root.ball)) {  
healthBar.\_xscale -= damage;  
}  
}

but it does not change to healthBar xscale

how can i fix this so it works?
