I want to be able to script effects for certain characters or group of characters within a text label’s text. I’ve tried to learn everything I can about it but I cannot find anything specifically for this.
Some examples would be having certain words in a dialogue box shake or fade in as the text generates (I already have a working typewriter type text system for talking with NPCs that gradually shows text). Here is an example of what I am talking about, with the text having an effect as it shows up: https://gyazo.com/97f031a89c2f9d8d4e8af9f28283bb82
Any help would be appreciated.
Honestly not sure, but you could make it type out the text, for example:
local text = script.Parent.Text
text = "H"
text = "Hi"
And do that until you have your words. For the shaking affects I’m not sure.
I do already have a text system, I am just trying to figure out the actual effects being used here.
You’ll have to create a separate text label for every character.
You can use GetTextSize or TextBounds to get the width of characters so you can solve the position for each one.
Hmm, makes sense. I’m not too sure, honestly. I’m pretty new to scripting, maybe ask someone more experienced
local text = "Hey My name is jeff AAAAAAA" -- text to show
for i = 1, #text do -- looping though how long the text is
script.Parent.Text = string.sub(text, 1, i)
wait() -- time between each letter showing up
You can add effects for it at least i did
Thanks, I was sure there wasn’t any way to do this with 1 text label. I’ll definitely try that.
I guess you can use TweenService idk how to tween each letter though.