I remember seeing something on wiki where you could find the text length of a string, I don't remember it clearly, so here is an example of what I have
script.Parent.Text = "g" wait(1) script.Parent.Text = "ge" wait(1) script.Parent.Text = "get" ----ETC.-------
We can get pieces of a string, called substrings using the sub
method:
msg = "Hello there" script.Parent.Text = msg:sub(1,5) -- get characters 1 to 5 (inclusive)
There are #msg
characters in msg
(#
is a unary operator for string length as well as table length) so a loop could look like this:
for i = 1, #msg do script.Parent.Text = msg:sub(1, i) wait(1) end