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: GUI Recharge?

Previous Thread :: Next Thread 
ThePixel is not online. ThePixel
Joined: 15 May 2010
Total Posts: 225
23 Jul 2011 03:36 PM
How would I make it so, once a image label is clicked. It can only be clicked again after 15 seconds?
Report Abuse
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
23 Jul 2011 03:39 PM
local db = true
button.MouseButton1Down:connect(function()
if db == false then return end
db = false
print("Clicked, wait 15 seconds...")
wait(15)
db = true
print("Button is active once more")
end)
Report Abuse
ThePixel is not online. ThePixel
Joined: 15 May 2010
Total Posts: 225
23 Jul 2011 03:40 PM
Okay, thank you but what do I have to change in the script?
Report Abuse
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
23 Jul 2011 03:42 PM
local db = true
button.MouseButton1Down:connect(function()
if db == false then return end
db = false
print("Clicked, wait 15 seconds...")--What happens when it clicks
wait(15) --How long until it finished recharging
db = true
print("Button is active once more")--You can remove this if you want..
end)
Report Abuse
ThePixel is not online. ThePixel
Joined: 15 May 2010
Total Posts: 225
23 Jul 2011 03:46 PM
I must be doing something wrong because this didn't work..

local db = true
button.MouseButton1Down:connect(function()
if db == false then return end
db = false
script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.WalkSpeed = 50
wait(3)
script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.WalkSpeed = 16
wait(15)
db = true
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