Is there a less messy way?

I want the text to gradually appear, character by character…
Is there a less messy way to run this:

text.Text = "H"
wait(0.1)
text.Text = "He"
wait(0.1)
text.Text = "Hel"
wait(0.1)
text.Text = "Hell"
wait(0.1)
text.Text = "Hello"
wait(0.1)
text.Text = "Hello!"
1 Like

This would help you.

local stringtext = "Hello!"

for i = 1, #stringtext, 1 do
text.Text = string.sub(stringtext, 1 , i)
wait(1)
end
1 Like

Thanks! I will have a look at this!

Thanks, but can you explain the “V” at the end of the sub. That would be helpful. When I get a script, I like to know what it means. That is how I can improve and get better. Thanks! :star_struck: :star_struck: :star_struck:

Edit: Did you mean “i” ?

Yes I did, I usually use v when doing for loops so I automatically put that there. My bad. The editted text should work now. Just make sure to define “text”

1 Like

Thanks! (It works!) You helped. (can you edit that to “i” so other users don’t get confused when I make it the solution.

Edit: Thanks!

1 Like