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
 

Thank you guys so much :)

Previous Thread :: Next Thread 
KenjiMatsumura is not online. KenjiMatsumura
Joined: 01 Dec 2013
Total Posts: 195
02 Aug 2015 06:04 PM
Original Post: --has original script
http://www.roblox.com/Forum/ShowPost.aspx?PostID=169730084

New Script That Works:

local buttonPressed = true
local button = game.Workspace.Button
local player = game.Players:FindFirstChild(script.Parent.Parent.Name)
local timerGui = player.PlayerGui.Countdown

button.ClickDetector.MouseClick:connect(function()
if not buttonPressed then
return
end
buttonPressed = false
for i = 180, 0, -1 do
wait(1)
timerGui.TimeFrame.Numbers.Text = i
if i == 0 and buttonPressed == false then
buttonPressed = true
break
end
end
end)

--[[ Notable mentions: I added a button that triggers the gui. I'm going to play around with it some. Try to have it countdown when a round starts, or make it do something when that time runs out. I also added a debounce of sorts...I think I kinda did it wrong, but hey, it works!!--]]

Thanks so much to everyone that has helped!!!
Report Abuse
AdvancedDrone is not online. AdvancedDrone
Joined: 17 Apr 2010
Total Posts: 2599
02 Aug 2015 06:11 PM
there is an easier countdown method:

local wait = 10

for x = wait,1, -1 do
script.Parent.Text = "Starting game in " .. x
end
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