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 » Scripters
Home Search
 

Re: Countdown...

Previous Thread :: Next Thread 
cokePanda is not online. cokePanda
Joined: 30 Dec 2008
Total Posts: 1901
07 Apr 2015 03:11 PM
local P = script.Parent
while true do
wait(1)
P.Value = P.Parent.Time.Value -1

end


P.Parent.Time.Value is set to something every few seconds, I want this script to check what it is, and then count down from it to 0 and then stop, and wait for P.Parent.time.Value to be set to something again and then count down, any one get what I'm trying to achieve and could help me out with sorting a code for this? I'd really appreciate it.



Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
07 Apr 2015 03:13 PM
Sorry if I misunderstood you, but you could try something like this:

function CountDown(int)
for i = int,0, -1 do
script.Parent.TextLabel.Text = i;
wait(1)
end
end
Report Abuse
cokePanda is not online. cokePanda
Joined: 30 Dec 2008
Total Posts: 1901
07 Apr 2015 03:22 PM
You hve misunderstood me
Report Abuse
cokePanda is not online. cokePanda
Joined: 30 Dec 2008
Total Posts: 1901
07 Apr 2015 03:34 PM
bump
Report Abuse
AnimatedUglyPet is not online. AnimatedUglyPet
Joined: 23 Feb 2013
Total Posts: 364
07 Apr 2015 03:35 PM
Get out you stupid #### go ask for help in the ##### ####
Report Abuse
RelaxRobby is not online. RelaxRobby
Joined: 11 Apr 2011
Total Posts: 104
07 Apr 2015 03:36 PM
function Intermission()
for i = IntermissionTime, 0, -1 do
print("Intermission: " .. i .. "")
end
end
end
Report Abuse
RelaxRobby is not online. RelaxRobby
Joined: 11 Apr 2011
Total Posts: 104
07 Apr 2015 03:37 PM
local IntermissionTime = 30
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
07 Apr 2015 03:38 PM
local P = script.Parent
while true do
wait(1)
if P.Value > 0 then
P.Value = P.Parent.Time.Value -1
end
end
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
07 Apr 2015 03:40 PM
local t = script.Parent.Time
while wait() do
wait(1)
t.Value = t.Value - 1

if t.Value == 0 then
print("Time is 0")
for i = 20,1,-1
t.Value == i --new Value is 20
end
end
end

Is this what you are trying to achieve? If not can you clarify again?
Report Abuse
cokePanda is not online. cokePanda
Joined: 30 Dec 2008
Total Posts: 1901
07 Apr 2015 04:10 PM
Screen Gui> - Holds all below in it.

1. TextButton>Script - Script changes Value in TextButton named "Time" (NumberValue). - works
2. Time(NumberValue) - Used by above for wait(Time)
3. Count(NumberValue)>Script - Script changes Value of Count to Value of Time and Counts it down by doing -1 every 1 second (wait(1)) - doesn't work
4. Countdown(TextLabel) - Text of it should show Count(NumberValue), a countdown - doesn't work.


Script for 3.Count (not working):

local IntermissionTime = script.Parent.Parent.Time

function Intermission()
for i = IntermissionTime.Value, 0, -1 do
script.Parent.Value = i
end
end



Script for 4.Countdown (not working):

while true do wait(0.4)
if script.Parent.Parent.Parent.Visible == true then
local sec = script.Parent.Parent.Parent.Parent.TextButton.Count
script.Parent.Text = ""..sec.Value.."s"

else print'no'
end
end





Is there anyone who could help me with this? I can provide you with a model for this, so it's a lot easier to fix... I would really appreciate your time.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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