Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How could I make a Typing Gui?

Asked by 10 years ago

So basically I want a typing Gui, by this I mean something like this:

script.Parent.Text = "H"
wait(0.1)
script.Parent.Text = "He"
wait(0.1)

I know it has to do something with for, but I am not sure how. Help please?

0
It would be great if there was a type of :Tween for this. ConnorVIII 448 — 10y

2 answers

Log in to vote
1
Answered by 10 years ago
local msg = "Message"

for i = 1, msg:len() do
script.Parent.Text = msg:sub(1, i)
wait(0.1)

Ad
Log in to vote
1
Answered by 10 years ago
function addWord(GUI, word, betweenTime)
    for v in string.gmatch(word, ".") do --For every letter in the word
        GUI.Text = GUI.Text..v --Add the letter to the GUI's text.
        wait(betweenTime)
    end
end

addWord(script.Parent, "Hello, " 0.1)
addWord(script.Parent, "World!", 0.05)

Answer this question