Why NumberValue does not reset once it hits 0? Just goes into negatives
Asked by
7 years ago Edited 7 years ago
Like the most basic thing and i'm having a problem with it. It's just a count down thing. Two number Values and once the seconds hit 0 its supposed to go back to 60 and drop a minute. But the timer just keeps counting down into the negatives.
01 | local min = script.Minutes |
02 | local sec = script.Seconds |
03 | local night = script.Night |
07 | sec.Value = sec.Value - 1 |
10 | sec.Changed:connect( function () |
13 | min.Value = min.Value - 1 |
Any help is appreciated!
Edit: Sorry I worded the title terribly. I just could not think of a way to ask this.