01 | --Variables |
02 | local speech = script.Parent.Speech |
03 |
04 | --Test |
05 | workspace.TestClick.ClickDetector.MouseClick:Connect( function () |
06 |
07 | speech.Text = "H" |
08 | wait( 0.03 ) |
09 | speech.Text = "He" |
10 | wait( 0.03 ) |
11 | speech.Text = "Hel" |
12 | wait( 0.03 ) |
13 | speech.Text = "Hell" |
14 | wait( 0.03 ) |
15 | speech.Text = "Hello" |
16 |
17 | end ) |
Or do I have to type all of this out?
No, you would not have to type this all out, simply copy the script below!
01 | -- Variables |
02 |
03 | local speech = script.Parent.Speech |
04 | TextToType = "Hello" |
05 |
06 | -- Code |
07 |
08 | workspace.TestClick.ClickDetector.MouseClick:Connect( function () |
09 | for i = 1 ,#TextToType do |
10 | speech.Text = string.sub(TextToType, 1 ,i) |
11 | end |
12 | end ) |
Hope this helped <3
No, you would not have to type this all out! I call this the "Typewriting effect".
01 | --Variables |
02 |
03 | local text = "Hello" |
04 | local speech = script.Parent.Speech |
05 |
06 | --Code |
07 |
08 | workspace.TestClick.ClickDetector.MouseClick:Connect( function () |
09 | for i = 1 , #text do |
10 | wait(. 05 ) --change the wait to make the typewriting effect slower/faster |
11 | speech.Text = string.sub(text, 1 , i) |
12 | end |
13 | end ) |