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

GuiType help please?

Asked by 9 years ago

For example if I had the word "Pizza" it would type it out 1 by 1 on the screen like you would be doing it. Also it is in StarterGui->ScreenGui->Frame->TextLabel->Script The reason why I mess up is because I don't understand how to put string.len() and string.sub() together to make the text type 1 by 1.

0
Your code attempts? Perci1 4988 — 9y

1 answer

Log in to vote
0
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
9 years ago

To do this, we need to have the aid of a numerical for loop, and the string.sub method. We'll use the for loop to sub the text, and display it.

local text = 'Pizza'
local gui --Define the gui

for i = 1,text:len() do --Get the length of the text with string.len method
    gui.Text = text:sub(1,i)
    wait(.1)
end
0
`#text` also works to get the length, which I find much cuter. BlueTaslem 18071 — 9y
Ad

Answer this question