Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you make a TextLabel display a word one letter at a time?

Asked by 10 years ago

I want to make a TextLabel display a word on letter at a time. NOT like the following!

game.StarterGui.ScreenGui.Textlabel.Text = "E"
wait(0.1)
game.StarterGui.ScreenGui.Textlabel.Text = "EX"
wait(0.1)
game.StarterGui.ScreenGui.Textlabel.Text = "EXA"
wait(0.1)
game.StarterGui.ScreenGui.Textlabel.Text = "EXAM"
wait(0.1)
game.StarterGui.ScreenGui.Textlabel.Text = "EXAMP"
wait(0.1)
game.StarterGui.ScreenGui.Textlabel.Text = "EXAMPL"
wait(0.1)
game.StarterGui.ScreenGui.Textlabel.Text = "EXAMPLE"

2 answers

Log in to vote
3
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
10 years ago

Use a loop:

local text = "EXAMPLE";
for i = 1,#text do
    textlabel.Text = text:sub(1,i);
    wait(0.1);
end
0
Thanks My_Comment 95 — 10y
Ad
Log in to vote
-5
Answered by 10 years ago
game.Players.LocalPlayer.PlayerGui.ScreenGui.Textlabel.Text = "E"
wait(0.1)
game.Players.LocalPlayer.PlayerGui.ScreenGui.Textlabel.Text = "EX"
wait(0.1)
game.Players.LocalPlayer.PlayerGui.ScreenGui.Textlabel.Text = "EXA"
wait(0.1)
game.Players.LocalPlayer.PlayerGui.ScreenGui.Textlabel.Text = "EXAM"
wait(0.1)
game.Players.LocalPlayer.PlayerGui.ScreenGui.Textlabel.Text = "EXAMP"
wait(0.1)
game.Players.LocalPlayer.PlayerGui.ScreenGui.Textlabel.Text = "EXAMPL"
wait(0.1)
game.Players.LocalPlayer.PlayerGui.ScreenGui.Textlabel.Text = "EXAMPLE"
0
Dude... Did you even read the description? My_Comment 95 — 10y
0
Dude.. DOES IT REALLY MATTER? DDDropTheBase 0 — 10y
0
Yes, considering I ASKED FOR IT. I USED EXAMPLE FOR A SHORT EXAMPLE. I DIDNT WANT TO SHOW AN EXAMPLE WITH THE REAL THING. THE REAL WORDS WERE: Thanks for joining my game! Please leave a like and favorite if you liked my game! WOULD YOU WANT TO TYPE THAT OUT? My_Comment 95 — 10y

Answer this question