I'm assuming I would use a pairs loop? I need it to look like this and don't know how to make it work:
L, Li, Lik, Like, Like , Like T, Like Th, Like Thi, Like This, Like This.
You have to use a numerical for
loop, then use string.sub
from a preset target string!
local str = "Like this." --The target string --Iterate for the amount of characters the string has. for i = 1,#str do --Use string .sub with the 'i' value. local substr = str:sub(1,i) wait(.1) end
This is fairly simple.
Firstly,
define all your text strings
textID= {"Test"}
Then, make a for loop to type it out
for i=1, string.len(textID[i]) do script.Parent.UI.TextBack.txt.Text = (script.Parent.UI.TextBack.txt.Text..string.sub(textID[1],i,i) ) --Put your gui here game:GetService("RunService").RenderStepped:wait() end
So it should look like this:
textID= {"Test"} for i=1, string.len(textID[i]) do script.Parent.UI.TextBack.txt.Text = (script.Parent.UI.TextBack.txt.Text..string.sub(textID[i],i,i) ) --game:GetService("RunService").RenderStepped:wait() end