So what I want to achieve is to make certain words in a text appear with another color. For example: “Hey could you give me those coins” where the word “coins” appears with the color yellow and the other words are just black. I know this is not a built-in function but I’ve seen games have this type of text.
Right now I use
local text = “Text here”
for i = 1, #text do
script.Parent.Text = string.sub(text,1,i)
end
I’ve seen people say that you should use a different text label for each word but that is a lot of work and I know it’s possible to script.
Unfortunately multiple text labels are the only way the achieve this currently. You could make an engine feature request for this provided it has not been made already.
@Defaultio wrote a really neat module that should suit your needs until Roblox gets around to implementing rich text.
Edit: For people still finding this thread, check out the native rich text system if you just need to change basic properties within a single text object. Nonetheless, the module above has more expressive features, such as inline images and entrance animations, that would be great for a dialogue system.