GUI Typewrite effect help

Hi guys, so I’m new to scripting, and I want to make a typewrite effect using the GUI, but I don’t want to edit the text in the script…

So I want to know, if it’s possible to make the effect with the TextGUIS already done
like this…
image

This is the script that I did (without the effect, it just appears and disappears)

So I want to make it like this script, the player touches a part, and the GUI’S starts appearing with a typewrite effect, and it lasts the same time as the wait()

You can simply do this:

local toWrite = 'Hello world!'

for i = 1, #toWrite do
	--(str):sub(...) is the same as string.sub(str, ...)
	print(toWrite:sub(1, i))
	wait(0.5)
	
end

What sub does is trim the string based on the indices of the characters. For example, H is index 1, while the first o is index 5.

I’m printing here just as a demo, but you can set the Text property as well.

textlabel.Text = toWrite:sub(1, i)
4 Likes