GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 20 Nov 2012 01:34 PM |
local CountDown = 750 local a = false script.Parent.ClickDetector.MouseClick:connect(function() a = true wait()
local h = Instance.new("Hint" , Workspace) h.Text = "Raiders have captured the nuke!" wait(5) while true do wait(1) Countdown -1 h.Text =
So this is where I have stopped... I'm not sure what comes next other then 2 ends.
|
|
|
| Report Abuse |
|
|
OBF
|
  |
| Joined: 29 Sep 2009 |
| Total Posts: 10709 |
|
|
| 20 Nov 2012 01:37 PM |
local CountDown = 750 local a = false script.Parent.ClickDetector.MouseClick:connect(function() a = true wait()
local h = Instance.new("Hint" , Workspace) h.Text = "Raiders have captured the nuke!" wait(5) while true do wait(1) h.Text = "Time left: " ..Countdown Countdown = Countdown - 1 end end) |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 20 Nov 2012 01:57 PM |
Thanks.
Now I thought this would stop the loop... guess not.
llocal Countdown = 10 local a = false script.Parent.ClickDetector.MouseClick:connect(function() a = true wait()
local h = Instance.new("Hint" , Workspace) h.Text = "Raiders have captured the nuke!" wait() while true do wait(1) h.Text = "Time left: " ..Countdown Countdown = Countdown - 1 end if Countdown == 0 then Countdown = 0 end end) |
|
|
| Report Abuse |
|
|
Exobyte
|
  |
| Joined: 26 Jul 2011 |
| Total Posts: 386 |
|
|
| 20 Nov 2012 01:58 PM |
Instead of while true do, put this:
while Countdown > 0 do |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 20 Nov 2012 02:00 PM |
local Countdown = 10 local a = false script.Parent.ClickDetector.MouseClick:connect(function() a = true wait()
local h = Instance.new("Hint" , Workspace) h.Text = "Raiders have captured the nuke!" wait() repeat h.Text = "Time left: " ..Countdown Countdown = Countdown - 1 wait(1) until CountDown <=0 end)
|
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
| |
|