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: Countdown Clock

Previous Thread :: Next Thread 
73EPIC311 is not online. 73EPIC311
Joined: 28 Aug 2012
Total Posts: 454
02 May 2013 03:41 PM
Is this correct?

a = game.StarterGui.GameStuff.GameClock.Text
b = wait(1)

if game.StarterGui.GameStuff.Round.Text = "Capture The Flag" then
a = "00:03"
b
a = "00:02"
b
a = "00:01"
b
a = "00:00"
b
a = "N/A"
end
Report Abuse
btft is not online. btft
Joined: 19 Feb 2011
Total Posts: 1512
02 May 2013 03:46 PM
a = game.StarterGui.GameStuff
b = 1 --change wait time here


if a.Round.Text == "Capture The Flag" then
a.GameClock.Text = "00:03"
wait(b)
a.GameClock.Text = "00:02"
wait(b)
a.GameClock.Text = "00:01"
wait(b)
a.GameClock.Text = "00:00"
wait(b)
a.GameClock.Text = "N/A"
end
Report Abuse
pauljkl is online. pauljkl
Joined: 23 Oct 2008
Total Posts: 9364
02 May 2013 04:40 PM
The problem is that youre changing the StarterGui, not the PlayerGui of all players
Report Abuse
73EPIC311 is not online. 73EPIC311
Joined: 28 Aug 2012
Total Posts: 454
02 May 2013 04:41 PM
How would I change the PlayerGui of all players?
Report Abuse
btft is not online. btft
Joined: 19 Feb 2011
Total Posts: 1512
02 May 2013 04:43 PM
a = game.StarterGui.GameStuff
b = 1 --change wait time here


if a.Round.Text == "Capture The Flag" then
a.GameClock.Text = "00:03"
wait(b)
a.GameClock.Text = "00:02"
wait(b)
a.GameClock.Text = "00:01"
wait(b)
a.GameClock.Text = "00:00"
wait(b)
a.GameClock.Text = "N/A"
end

for _, v in pairs (game.Players:GetChildren()) do
ab = v.PlayerGui.GameStuff
if a.Round.Text == "Capture The Flag" then
a.GameClock.Text = "00:03"
wait(b)
a.GameClock.Text = "00:02"
wait(b)
a.GameClock.Text = "00:01"
wait(b)
a.GameClock.Text = "00:00"
wait(b)
a.GameClock.Text = "N/A"
end
end


put in both, so if a new player joins, they see the same.
Report Abuse
btft is not online. btft
Joined: 19 Feb 2011
Total Posts: 1512
02 May 2013 04:43 PM
a = game.StarterGui.GameStuff
b = 1 --change wait time here


if a.Round.Text == "Capture The Flag" then
a.GameClock.Text = "00:03"
wait(b)
a.GameClock.Text = "00:02"
wait(b)
a.GameClock.Text = "00:01"
wait(b)
a.GameClock.Text = "00:00"
wait(b)
a.GameClock.Text = "N/A"
end

for _, v in pairs (game.Players:GetChildren()) do
ab = v.PlayerGui.GameStuff
if a.Round.Text == "Capture The Flag" then
ab.GameClock.Text = "00:03"
wait(b)
ab.GameClock.Text = "00:02"
wait(b)
ab.GameClock.Text = "00:01"
wait(b)
ab.GameClock.Text = "00:00"
wait(b)
ab.GameClock.Text = "N/A"
end
end


EDIT: Sorry; error.
Report Abuse
GuideHelper is not online. GuideHelper
Joined: 01 Jun 2011
Total Posts: 1712
02 May 2013 04:57 PM
a = game.StarterGui.GameStuff
b = 1 --change wait time here


if a.Round.Text == "Capture The Flag" then
a.GameClock.Text = "00:03"
wait(b)
a.GameClock.Text = "00:02"
wait(b)
a.GameClock.Text = "00:01"
wait(b)
a.GameClock.Text = "00:00"
wait(b)
a.GameClock.Text = "N/A"
end

for _, v in pairs (game.Players:GetChildren()) do
ab = v.PlayerGui.GameStuff
if a.Round.Text == "Capture The Flag" then
a.GameClock.Text = "00:03"
wait(b)
a.GameClock.Text = "00:02"
wait(b)
a.GameClock.Text = "00:01"
wait(b)
a.GameClock.Text = "00:00"
wait(b)
a.GameClock.Text = "N/A"
end
end
Report Abuse
crazyman32 is online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
02 May 2013 05:43 PM
Oh my globbb, use loops!

local clock = game.StarterGui.GameStuff.GameClock
if game.StarterGui.GameStuff.Round.Text = "Capture The Flag" then
for i = 3,0,-1 do
local secondsFormat = ("00:%.2i"):format(i)
clock.Text = secondsFormat
end
end
Report Abuse
GuideHelper is not online. GuideHelper
Joined: 01 Jun 2011
Total Posts: 1712
02 May 2013 05:47 PM
True that!
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