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

What is wrong with this?

Asked by
Mauvn 100
10 years ago

Hello, i'm doing a disaster game and i want when the disaster is in action there is a hint to tell when the disaster will end here the script:

countdownTime = 20 -- How long until disaster comes 
countdowntime2 = 40
disasterTime = 40 -- How many second is the disaster

countdownMessage = "The next disaster will occur in %s seconds."
disasterMessage = "Disaster %s"
countdownmessage2 = "The Disaster will end in %s Seconds! Stay Alive!"

Any kind of help is appreciated!

1 answer

Log in to vote
3
Answered by
wazap 100
10 years ago
countdownTime = 20 -- How long until disaster comes
countdowntime2 = 40
disasterTime = 40 -- How many second is the disaster
 while true do
for i = countdownTime, 0, -1 do
countdownMessage = "The next disaster will occur in "..i.."seconds."
wait(1)
end

disasterMessage = "Disaster %s"

for i = countdownTime2, 0, -1 do
countdownMessage2 = "The current disaster will end in  "..i.."seconds."
wait(1)
end
end
0
I see no point of disliking this reply. Liking. Nickoakz 231 — 10y
Ad

Answer this question