Hello DevForum users!
I am creating a Type Writter effect but i encoutered a big issue.
-
What do you want to achieve? Keep it simple and clear!
I want to delete anything in the string that is rich text, or ignore it so i can play the right amount of sounds my type writter effect needs to play. -
What is the issue? Include screenshots / videos if possible!
I dont know any method that is not TOO complicated! -
What solutions have you tried so far? Did you look for solutions on the Creator Hub?
Searching here in DevForum, using text or string.sub (both get the perfect amount of characters from a string so yeah didnt work)
Current Code!
function Write(Text: string, Label: TextLabel)
if not Text or not Label then return end
TextLabel.MaxVisibleGraphemes = 0
for i = 1,string.len(Text) do
Label.Text = Text
script.Pop.PlaybackSpeed = math.random(95,115) / 100
script.Pop:Play()
Label.MaxVisibleGraphemes = i
task.wait(0.025)
end
end