Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
obcdino 113
9 years ago

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
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? NathanAdhitya 124 — 9y
0
Nice idea, I'll try it. obcdino 113 — 9y

1 answer

Log in to vote
0
Answered by
Im_Kritz 334 Moderation Voter
9 years ago

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)
0
I'm not using an ACTUAL message. Read the script to see what I mean. obcdino 113 — 9y
Ad

Answer this question