I know this script is full of errors but could anyone make it correct.
onClipEvent (load) {
this.stop();
_root.winner = “Fight!”;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.SPACE)) {
this.gotoAndStop(“attack”);
this.attack.play(1);
}
if (this.attack.fist.hitTest(_root.badGuy)) {
_root.ehp.nextFrame();
if.ehp. (_currentframe == 20)
gotoAndStop(“win”);
}
}
“ehp” is the name of a of a enemy healthbar.:crazy: