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

is there anyway to make letter delay in typeout?

i want text to type out but if its for example "." there will be a delay before it like in soulshatters test place

local text = "test..."
		for i = 1, #text do
			game.Players.LocalPlayer.PlayerGui.Dialogue.DialogueBackground.Text.Text = string.sub(text, 3, i)
			script.Voice:Play()
				wait(0.025)
			end

3 comments

0

Use wait()

0

that doesnt answer my question, my question is how to make it to give a delay for specifically symbols such as comma or dot, but letters appear with delay of 0.0025

0

if text[i] == "." then wait(1) end

1 answer

✓ Accepted answer

Check if the character is a symbol, then if it is, give it a longer delay than letters

local text = "test..."
local currentChar = "placeholder"
        for i = 1, #text do
		currentChar = string.sub(text, i, i)
            game.Players.LocalPlayer.PlayerGui.Dialogue.DialogueBackground.Text.Text = string.sub(text, 3, i)
            script.Voice:Play()
		if string.match(currentChar, "%p") ~= nil then -- %p represents all punctuation and symbols
		wait(1) -- or however long you want
		else
                wait(0.025)
		end
            end

For more on lua patterns

4 comments

0

yeah that obviously answered my question

0

how am i able to edit it so it only gives delay to symbols i want?

0

go to the link on the answer

0

found out, instead of "%p" just had to put "[insert symbols you want it to search]"

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