How to make text be typed?

I want to make the text in my text box be typed like the gyazo linked below but I am not sure on how to do it.

May someone help me?

https://gyazo.com/a9549e2d275ac6aead48d7d0e1f89bc1

Look it up on the devfourm. There is plenty of stuff about this!

local text = "Hi this is epic text ok"

for i = 1, #text do
    print(text:sub(1, i))
    wait(0.1)
end

Breakdown:

  1. Define some text
  2. Going from 1 to the length of the text
  3. A portion of a string is called a substring. This code gets the portion starting at 1, ending at i
  4. The text gradually shows the full message
1 Like

I implore that you try and use the search filter before making posts. With that aside:

You’d want to use string.sub, which cuts a string and returns it based on two arguments: a start and an end:

local txt = "text here"

for i = 0, #txt do
    TextLabel.Text = txt:sub(0, i)
    wait()
end

This is some psuedocode

1 Like

This worked, thanks for the help.