# Need help with score keeping!

**URL:** <https://forum.kirupa.com/t/need-help-with-score-keeping/131145>\
**Category:** Uncategorized\
**Created:** [December 12, 2004, 6:06pm UTC](https://forum.kirupa.com/t/need-help-with-score-keeping/131145 "2004-12-12T18:06:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chazzyman](https://avatars.discourse-cdn.com/v4/letter/c/c57346/32.png) [@chazzyman](https://forum.kirupa.com/u/chazzyman)\
**Post date:** [December 12, 2004, 6:06pm UTC](https://forum.kirupa.com/t/need-help-with-score-keeping/131145/1 "2004-12-12T18:06:14Z")

</div>

Im making a fighting game and i’m having trouble making player 1 or player 2’s score go up when he hits the other player. I’ve got 2 players and on player 1 i have this code to make the score go up  
onClipEvent (enterFrame) {  
if (Key.isDown(83))  
{  
this.gotoAndStop(5);  
if(\_root.B1main.b1kick, hitTest(\_root.B2main))  
{  
b1mainScore += 2;  
if(b1mainScore \>= winningScore)  
{  
\_root.gotoAndStop(3);  
}  
}  
}  
}  
and then on my control layer i have this code  
stop();  
b1mainScore = 0;  
b2mainScore = 0;  
winningScore = 100;  
and i have 2 dynamic text boxes 1 with the variable of b1mainScore and the other with b2mainScore. can anyone help me fix the problem so that the score goes up.
