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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|