local function TypeWrite(object,text,waittime)
--Object Is Must A TextLabel
--Text Must Be A String
--Waittime Must be A Number
for i = 1,#text,1 do
object.Text = string.sub(text,1,i)
wait(waittime)
end
end
Instead of comments, you can place an if statement or an assert to check if the object is really a text label; the same with the “waittime” and “text” parameters
Instead of using string.sub(), you can use a “for” loop to change the MaxVisibleGraphemes in the text label. You would have to set the TextLabel.Text to the string you desire before running the loop.
I would check out the MaxVisibleGraphemes property in most text objects, instead of updating the text each time (it’s more efficient!) Instead of updating the text, you can tween the property to animate how much text is visible!