It's obvious you can do this by doing:
01 | script.Parent.Parent.Dialog.TextLabel.Text = "H" |
02 | wait( 0.05 ) |
03 | script.Parent.Parent.Dialog.TextLabel.Text = "He" |
04 | wait( 0.05 ) |
05 | script.Parent.Parent.Dialog.TextLabel.Text = "Hel" |
06 | wait( 0.05 ) |
07 | script.Parent.Parent.Dialog.TextLabel.Text = "Hell" |
08 | wait( 0.05 ) |
09 | script.Parent.Parent.Dialog.TextLabel.Text = "Hello" |
10 | wait( 0.05 ) |
11 | script.Parent.Parent.Dialog.TextLabel.Text = "Hello." |
But I just want a simple function I can put my text into so that it does what I want easily.
It's actually really simple, try this :)
1 | local text = "Whatever text you want this to be" |
2 |
3 | for i = 1 , #text do |
4 | script.Parent.Parent.Dialog.TextLabel.Text = string.sub(text, 1 , i) |
5 | wait( 0.04 ) --This is the speed of the text |
6 | end |
Put the individual characters you want typed into the table called Words
01 | local Words = { "H" , "e'" , "l" , "l" , "o" , "." } |
02 |
03 | local function Type() |
04 | for i,v in pairs (Words [ i ] ) do |
05 | wait( 0.05 ) |
06 | script.Parent.Parent.Dialog.TextLabel.Text = script.Parent.Parent.Dialog.TextLabel.Text..v |
07 | end |
08 | end |
09 |
10 | Type() |
Press view source to see the entirety of line 6, it's pretty long.
This is fairly easy. Read this for information. https://developer.roblox.com/en-us/articles/animating-text