How to make score counter go into double digits?

I made a score counter using playmaker, and it doesn’t display double digits. I’m pretty sure it’s the string formatting, but I don’t know what to format it to. Please help.

You mean this?:

int number = 1;
string str = number.ToString("00");
//str will print "01"

I see some answers about making a custom string array, but why wouldn’t you just check if the number is < 10?

void SetScore(int number)
{
          if(number < 10 && number >= 0)
          TextBox.text = "0";

          TextBox.text += number;
}

Other behaviour for numbers larger than 99 or smaller than 0 can be defined as well. You can use the text box almost like a variable.