Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Sound problems. Any help?

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

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

This discussion is preserved as it was. New answers, comments, and votes are closed.