ok so I want TextLabel text sentence slowly type out like in those CSI movies you know where it types like a typewriter you know ok so that would look something like this
script.parent.text = "H" wait(.1) script.parent.text = "He" wait(.1) script.parent.text = "Hel" wait(.1) script.parent.text = "Hell" wait(.1) script.parent.text = "Hello"
you get the idea but there has to be a more professional and better way of doing this I just can't think of anything that would work in this situation.
Use string.sub()
to piece up a String, join this within a generic for
loop you can increment the character-max argument supplied to sub
, and as well optionally supply a yield as all loops require.
local TextLabel = script.Parent local TypeString = "Hello world!" for Character = 1,#TypeString do wait(.5) TextLabel.Text = TypeString:sub(1,Character) end