Hello, how can I make Only numbers bold, but letters stay normal in my given string?
I want a script auto detect whether a character is a number, and if it is a number it will be bold. Goal example:
“hello 123”
local String = "hello 123"
script.Parent.Text = String -- Help me make Only numbers bold in the whole text with an auto number detector script.
local String = string.format("You earned <b>%d</b> coins!", Coins)
string.format would be the more preferred approach as later revisions of the string could contain multiple numbers that have either no format or are formatted differently.
local String = string.format("You earned <b>%d</b> coins in <i>%d</i> seconds!", Coins, Seconds)