Sure, so let me introduce you to the string global! The one we’ll be focusing on right now is string.sub(). string.sub() can return the substring of s that starts at i and continues until j. So, taking this knowledge and for i loops, we can simply do this.
local function TextEffect(Text)
for i = 1,#Text, 1 do -- // This starts at 1 and ends at the amount of characters in Text.
local subbedString = string.sub(Text,1,i) -- // Starts at the first character and gradually increases i,
--hence showing more of the string
Test.Text = subbedString
end
end
If you’re creating a typewriter effect, you could try changing the MaxVisibleGraphemes property of the textlabel instead. Test.Text = “Hello” with MaxVisibleGraphemes set to 1 will read “H”, and you can tween/loop increment that value until you reach the size of the string.