Pause on letter "A" Typewrite

right now I am just doing simple typewriter, but I wanted to stop at the letter “A” but I don’t know how that would work. I would always just had to put the whole text first with the word :confused:

local function typewrite(object,text,dur)
	for i= 1, #text, 1 do
		object.Text = string.sub(text,1,i)
		local sound = script.speak:Clone()
		sound.Parent = game.SoundService
		if string.sub(text,1,i) == "A" then
			wait(0.5)
			sound:Play()
			game.Debris:AddItem(sound,0.5)
		else
			wait(dur)
			sound:Play()
			game.Debris:AddItem(sound,0.5)
		end
	end
end

if string.sub(text,i,i) == "A" then

4 Likes

if it IS that, then I am hella stupid.
Yes it works. Thank you kindly sir