I have a simple script that displays text on a GUI in a typewriter way . It's pretty simple and my only problem is; how do I add sound for each letter typed? The problem is that it only plays the sound at the end after everything is typed.
function typewriter(text)
script.Parent.Text = "";
for i in string.gmatch(text, ".") do
wait()
script.Parent.Text = script.Parent.Text..i;
script.Parent.Parent.Parent.Parent.Parent.TextSound:Play()
end
end
typewriter("Sample Text")
Where exactly should I put...
script.Parent.Parent.Parent.Parent.Parent.TextSound:Play()
..exactly?
I'm confused any help?
