You have
if countDownNumber >= -1 then
countDownNumber = countDownNumber - 1
This means that the if
block will be entered whenever countDownNumber
is larger or equal to -1, i.e. any positive number, 0, and -1. Inside the block, it gets decreased by 1 so the last value will be -2.
You probably want >= 1
, which will make its last value 0:
if countDownNumber >= 1 then
countDownNumber = countDownNumber -1