Hello. So I recently made a typewrite script but the only error was that I wanted to make the text pause the resume again. script below:

local TextLabel = script.Parent
local Text

function Type(word, Duration)
	Text = word
	for i = 1, #Text do
		TextLabel.Text = string.sub(Text, 1, i)
		Sound() -- Plays sound
		TextLabel.TextColor3 = Color3.fromRGB(255,255,255)
        wait(0.05)
        wait(Duration)
	end
end

Type("Hello, 1.5, "Test")

Unfortunately this only sets how quick the text appears. Help appreciated!