Overflow text fix

Hello!
I have a game where it displays score on the top of the screen.
How can I make it where if they player gets a super high score, the text just gets smaller and smaller so it all fits?
Thanks.

@Carson365

Add a ContentSizeFitter component to same object which has the text component. You can then set the Vertical Fit property to PreferredSize for example, to have the Rect for that object automatically be the size required to fit the text.

So I did what you said but it still just goes outside the screen where you cant see it anymore.
I put horizontal fit and vertical fit to preferred size.

If it is a text component just enable the Best fit option and choose a max and min size.

109231-texteee.png