generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Game timer script help

Previous Thread :: Next Thread 
basset is not online. 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
1billybob1 is not online. 1billybob1
Joined: 15 Jun 2008
Total Posts: 4852
13 Mar 2012 07:28 PM
Any Output?
Report Abuse
Trapper4O77 is not online. Trapper4O77
Joined: 03 Aug 2011
Total Posts: 5648
13 Mar 2012 07:29 PM
'print' won't put text into the visible realm of scripting. Only the output.
Report Abuse
Trapper4O77 is not online. Trapper4O77
Joined: 03 Aug 2011
Total Posts: 5648
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
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
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 is not online. 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
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
13 Mar 2012 07:50 PM
Use what I gave you. It shortens the script a ton
Report Abuse
basset is not online. basset
Joined: 16 Jun 2008
Total Posts: 14510
13 Mar 2012 08:33 PM
thanks
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image