# I need help in scoring

**URL:** <https://forum.kirupa.com/t/i-need-help-in-scoring/134132>\
**Category:** Uncategorized\
**Created:** [January 14, 2005, 10:22pm UTC](https://forum.kirupa.com/t/i-need-help-in-scoring/134132 "2005-01-14T22:22:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ar1](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@ar1](https://forum.kirupa.com/u/ar1)\
**Post date:** [January 14, 2005, 10:22pm UTC](https://forum.kirupa.com/t/i-need-help-in-scoring/134132/1 "2005-01-14T22:22:49Z")

</div>

I need some help. I have this so far.

\_root.score1 = 100  
\_root.score2 = 20

set as my background frame thing.  
I have two text planes. One is score1 the other is score2.  
I made a button that had this code.

on(release) {  
score1 = score1 + 5  
score2 = score2 - 5

All of that works perfectly, but then score2, once it reaches zero, it goes into negative.

How do I make it so that score2 doesn’t go into a negative number?  
Is this clear enough?
