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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: how to make a count down block?

Previous Thread :: Next Thread 
99992400lukas is not online. 99992400lukas
Joined: 14 Mar 2013
Total Posts: 157
20 Jun 2014 07:58 PM
im not sure how and i am still learning how to script
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
20 Jun 2014 07:59 PM
A for loop (Increment negative), a few waits and some method of output.
Report Abuse
99992400lukas is not online. 99992400lukas
Joined: 14 Mar 2013
Total Posts: 157
20 Jun 2014 08:00 PM
what?
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
20 Jun 2014 08:03 PM
script.Parent.Touched:connect(function(hit)
if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
for i = 10, 0, -1 do wait(1)
print(i)
end
end
end

I didn't add a debounce, so it will run multiple times.
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
20 Jun 2014 08:03 PM
Put that in a brick.
Report Abuse
99992400lukas is not online. 99992400lukas
Joined: 14 Mar 2013
Total Posts: 157
20 Jun 2014 08:05 PM
how would i make the countdown stop when a gui button is touched to stop it?
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
20 Jun 2014 08:06 PM
With a few more complexities, values and scripts.
Report Abuse
99992400lukas is not online. 99992400lukas
Joined: 14 Mar 2013
Total Posts: 157
20 Jun 2014 08:09 PM
im learning scripting i dont know what all that means
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
20 Jun 2014 08:13 PM
It means its harder.
Report Abuse
99992400lukas is not online. 99992400lukas
Joined: 14 Mar 2013
Total Posts: 157
20 Jun 2014 08:16 PM
oh
Report Abuse
99992400lukas is not online. 99992400lukas
Joined: 14 Mar 2013
Total Posts: 157
20 Jun 2014 09:22 PM
it has a red line under the last end heres the output

20:21:01.499 - Script 'Workspace.Script', Line 2
20:21:01.500 - Stack End
Report Abuse
99992400lukas is not online. 99992400lukas
Joined: 14 Mar 2013
Total Posts: 157
20 Jun 2014 09:37 PM
1
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
20 Jun 2014 09:42 PM
add ')' on the last end.
Report Abuse
99992400lukas is not online. 99992400lukas
Joined: 14 Mar 2013
Total Posts: 157
20 Jun 2014 09:53 PM
nothing happens with the block
Report Abuse
secretidagent is not online. secretidagent
Joined: 07 Nov 2010
Total Posts: 1600
20 Jun 2014 10:02 PM
I know this is pointless but another way to make a loop go down is by doing:

for i=10,1,-1 do
print(tostring(i)) --just an example
end
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