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

Why won't this script end the message?

Asked by 10 years ago

Hello, I have just made this script but when it ends, it just stays on the last message and never goes away..

Please can someone help? :)

Thanks!

001local p = Instance.new("Hint",game.Workspace)
002 
003function onClick()
004p.Text = 90
005Wait (1)
006p.Text = 89
007Wait (1)
008p.Text = 88
009Wait (1)
010p.Text = 87
011Wait (1)
012p.Text = 86
013Wait (1)
014p.Text = 85
015Wait (1)
View all 197 lines...

2 answers

Log in to vote
6
Answered by
TofuBytes 500 Moderation Voter
10 years ago

Just a small side note onto both question and answer. You can actually simplify the lines of code in this script. This is just in-case you want to use a simplified version.

01local p = Instance.new("Hint",game.Workspace)
02 
03function onClick()
04for countdown=90,0,-1 do
05p.Text = (countdown)
06wait(1)
07end
08p.Text = "The results have been verified!"
09wait(5)
10p:Destroy()
11end
12 
13script.Parent.ClickDetector.MouseClick:connect(onClick)
0
Thank you sir! I am increasing my knowing of Lua everyday! WelpNathan 307 — 10y
0
No problem! :) TofuBytes 500 — 10y
Ad
Log in to vote
2
Answered by
Seraine 103
10 years ago
001local p = Instance.new("Hint",game.Workspace)
002 
003function onClick()
004p.Text = 90
005Wait (1)
006p.Text = 89
007Wait (1)
008p.Text = 88
009Wait (1)
010p.Text = 87
011Wait (1)
012p.Text = 86
013Wait (1)
014p.Text = 85
015Wait (1)
View all 198 lines...

Hope this helps!

0
Worked perfectly. Thank you! :) WelpNathan 307 — 10y

Answer this question