Hide digits in custom score font

I used TB's "custom font score counter" in my project but I am wondering how to hide the numbers which are not in use? I have 6 zeros displayed, if the score is a 100 it will look like this --> 000100. How do I make it so it displays only 100 without the 000 infront?
Comments
If game.score is less than xxxx
--Change self.alpha to 0
Otherwise
--Change self.alpha to 1
xxxx needs to be what ever value the minimum that digit will be visible.
edit: @QS - take that :P
If score is greater than 1000, say, then set alpha to 1 otherwise set alpha to 0.
The 1000 would be used for your 4th digit from the right.
100000 would be used for your fifth digit with a 'if score is greater than 10000' for example.
Essentially, make each digit visible as and when the score needs them!
Make sense?
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
If game.score is less than 1000
--Change self.alpha to 0
Otherwise
--Change self.alpha to 1
If you put the in the second digit from the left it would not show up 100-999
Your second digit (of four) from the right would count the 100s. The third the 10s. The fourth the 1s.
So you take the lowest figure for each of those.
For the second from the right:
If score is greater or equal to 100
Third from right:
If score is greater or equal to 10
Fourth from right:
If score is greater or equal to 1
Hope that helps!
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Thanks again for the clear explanation buddy.