Hi again. I couldn’t think of a good way to explain my question in the title so I’ll explain it here: So I have a simple “typewriter” script, right?
for i = 1, #text do
task.wait(1/charPerSecond)
TextLabel.Text = string.sub(text, 1, i)
end
So this basically adds another character to the text each time it loops, essentially making a typewriter effect. How would I be able to know the last character the loop inserted? So if I were to add a print function in the for loop, it would output something like this:
H
e
l
l
o
i feel like i didnt explan ths well enough idk i feel braindead. please just ask if you need more clarification
Like in the clip, it will basically just takes the last letter in the text every time it loops. I’m pretty sure it has something to do with sub.string but I can’t find anything on it that contributes to the solution I’m looking for