top of page

How to create "Typewritten" text: Roblox

This is what I mean by typewritten:

The concept here is very simple. All you have to do is run a for loop and use string.len. The outputted text could be used in anything such as a ScreenGui, SurfaceGui or just printed into the Output.

 

For GUIs, create your GUI and then insert a script or use a script you already have in your GUI. I like to use local scripts due to the fact that you can request the player's Player if needed.

Here is an example script for reference.

 

local text = "This variable is called text. This is a tutorial from steadyon roblox."

for i = 1, #text do

script.Parent.Hello.Text = string.sub(text, 1, i)

wait()

end

 

Here is the real code to put into the script, {EXAMPLE} means that it is case sensitive and you need to fill that part in with what it tells you to.

 

local text = "{YOUR STRING}"

for i = 1, #text do

{TextLabel/ TextButton/ TextBox path (remember to put .Text at the end)} = string.sub(text, 1, i)

wait()

end

 

If you just want to print your text. The process is almost identical:

Here is an example script for reference.

 

local text = "This variable is called text. This is a tutorial from steadyon roblox."

for i = 1, #text do

print(string.sub(text, 1, i))

wait()

end

 

Here is the real code to put into the script, {EXAMPLE} means that it is case sensitive and you need to fill that part in with what it tells you to.

 

local text = "{YOUR STRING}"

for i = 1, #text do

print(string.sub(text, 1, i))

wait()

end

 

Happy typewriting!

Alternatively you can get the model here:

https://www.roblox.com/item.aspx?id=598014708

Or, watch the youtube video here:


 Recent   
 Posts  
bottom of page