String.match custom

Just say you have 3 strings: Hello, Rent, Fallen, and you use string.match to find the “E” in each string once you do that how could i make it so the rest of the letters would be white but then the letters you used with string.match are a different color like if you have, Hello, Gel, Eleven, the ‘el’ in hello, gel, and eleven would be green and the rest would be white, i was thinking rich text but now im blanking.

You can use string.gsub("Hello", "e", "<b>e</b>") but I think there’s a better way.

1 Like