Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Sound problems. Any help?

Asked by 9 years ago

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?

1 answer

Log in to vote
0
Answered by 9 years ago

It's okay i figured it out. It was pretty simple; the sound was playing so fast you couldn't hear it.

Ad

Answer this question