I’m doing a typewriter effect for a TextLabel and I’m also trying to play a sound with it. Unfortunately, no matter where I put it in the for loop, it just doesn’t play. Anyone know how I can make the for loop also play the sound while the text is being typed?
local text = "Welcome to another one of my idiotic games"
local sound = game.Workspace.Sound
wait(5)
for i = 1, #text do
script.Parent.Text = string.sub(text, 1, i)
wait(0.005)
end
Actually, could you try changing it to a LocalScript inside StarterPack and & try this instead?
local text = "Welcome to another one of my idiotic games"
local sound = game.Workspace.Sound
wait(5)
for i = 1, #text do
game.SoundService:PlayLocalSound(Sound)
script.Parent.Text = string.sub(text, 1, i)
wait(0.005)
end
Reference:
Not sure if this will work but give it a shot I suppose?