Let's say i have a text box in a gui, How would i make it in the script so that letters will appear one by one in a successive manner, Giving the impression of it being typed?
Thank you.
Found it out myself, going to post it for possible future people <->
local StringText = ("text") -- this is your string local StringCount = 0 -- this is just to declare the variable for w in string.gmatch(StringText, ".") do -- this searches and adds to the counter StringCount = StringCount + 1 print(w) end
for i = 1, StringCount do -- this takes how many characters there are script.Parent.Text = string.sub(StringText, 1, i) -- this add one each time wait(0.1) -- this slows it down to give that Typewriter effect. end
Instead of looping through the string, you can just use the length operator, #Text
.
I can't post this as a comment, so that's why its an answer. Take it as a comment.