basset
|
  |
| Joined: 16 Jun 2008 |
| Total Posts: 14510 |
|
|
| 13 Mar 2012 07:27 PM |
I am trying to make a timer for a game that counts down to 0 and kills everyone and returns them to the lobby. I am a beginner scripter. I made these timers, will they both work? I'm trying to get the timer to appear in the black bar at the top.
first script-
while 2 + 2 == 4 do print("60") wait(1) print("59") wait(1) print("58") wait(1) print("57") wait(1) print("56") wait(1) print("55") wait(1) print("54") wait(1) print("53") wait(1) print("52") wait(1) print("51") wait(1) print("50") wait(1) print("49") wait(1) print("48") wait(1) print("47") wait(1) print("46") wait(1) print("45") wait(1) print("44") wait(1) print("43") wait(1) print("42") wait(1) print("41") wait(1) print("40") wait(1) print("39") wait(1) print("38") wait(1) print("37") wait(1) print("36") wait(1) print("35") wait(1) print("34") wait(1) print("33") wait(1) print("32") wait(1) print("31") wait(1) print("30") wait(1) print("29") wait(1) print("28") wait(1) print("27") wait(1) print("26") wait(1) print("25") wait(1) print("24") wait(1) print("23") wait(1) print("22") wait(1) print("21") wait(1) print("20") wait(1) print("19") wait(1) print("18") wait(1) print("17") wait(1) print("16") wait(1) print("15") wait(1) print("14") wait(1) print("13") wait(1) print("12") wait(1) print("11") wait(1) print("10") wait(1) print("9") wait(1) print("8") wait(1) print("7") wait(1) print("6") wait(1) print("5") wait(1) print("4") wait(1) print("3") wait(1) print("2") wait(1) print("1") wait(1) print("0") wait(1) print("Round Over!") end
Second script-
for i = 60, 0, -1 do print(i) end
|
|
|
| Report Abuse |
|
|
| |
|
|
| 13 Mar 2012 07:29 PM |
| 'print' won't put text into the visible realm of scripting. Only the output. |
|
|
| Report Abuse |
|
|
|
| 13 Mar 2012 07:30 PM |
If you want to make text in that little black box (Hint) use:
h = Instance.new("Hint") h.Parent = Workspace
Then instead of 'print ("#")' use:
h.Text = "#" |
|
|
| Report Abuse |
|
|
|
| 13 Mar 2012 07:39 PM |
local msg = Instance.new("Hint",game.Workspace) msg.Name = "MyTimer"
while (true) do for i = 60,0,-1 do msg.Text = tostring(i) wait(1) end msg.Text = "ROUND OVER" wait(5) end |
|
|
| Report Abuse |
|
|
basset
|
  |
| Joined: 16 Jun 2008 |
| Total Posts: 14510 |
|
|
| 13 Mar 2012 07:50 PM |
h = Instance.new("Hint") h.Parent = Workspace h.Text = "60" wait(1) h.Text = "59" wait(1) h.Text = "58" wait(1) h.Text = "57" wait(1) h.Text = "56" wait(1) h.Text = "55" wait(1) h.Text = "54" wait(1) h.Text = "53" wait(1) h.Text = "52" . . . end
Like that? |
|
|
| Report Abuse |
|
|
|
| 13 Mar 2012 07:50 PM |
| Use what I gave you. It shortens the script a ton |
|
|
| Report Abuse |
|
|
basset
|
  |
| Joined: 16 Jun 2008 |
| Total Posts: 14510 |
|
| |
|