Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to make a typing effect with text?

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.

2 answers

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

1 comment

0

Use the code block button... It's there for a reason

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.