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

How could I make it so when one message finishes it waits 3 seconds?

You might say "Put wait(3) idiot ._." no. Yes, I could do that, but when I did try to do that, it only slowed the 2nd message typing. A LOT. All I'm trying to do is when message 1 ends, just make it wait 3 seconds before going again. The problem is this is a loop, and it repeatedly does the wait(3), massively slowing the typing.

I could use help

Computerized Typing script:

message = "Welcome to Disaster Dash. It is a parkour-based game." -- http://www.javascriptkit.com/script/script2/charcount.shtml
letteramount = 53
went = 0
message2 = "The objective is to get past the obstacles and reach the other side unharmed."
letteramount2 = 77
went2 = 0
text = script.Parent

wait(1)
while wait(0.050) do
	if went < letteramount then
	went = went + 1
	text.Text = message:sub(1,went)
	elseif went == letteramount then
		went2 = went2 + 1
		text.Text = message2:sub(1,went2)
		
	end
end

2 comments

0

In my opinion, 2 Loops, when first loop for first message finishes(If letter amount = typed amount), it waits for 3 seconds then displays the second message, How's that?

0

Nice idea, I'll try it.

1 answer

If you use the debris service, you can have the message wait three seconds then delete itself. By doing this, you can send out multiple messages.

Here's an example for game:GetService('Debris'):AddItem()

local Message1 = Instance.new('Message', workspace)
game:GetService('Debris'):AddItem(Message1, 3)
wait(3)
local Message2 = Instance.new('Message', workspace)
game:GetService('Debris'):AddItem(Message2, 3)

1 comment

0

I'm not using an ACTUAL message. Read the script to see what I mean.

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