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: Debounce Problems with 2 scripts

Previous Thread :: Next Thread 
xKingDoge is online. xKingDoge
Joined: 03 Dec 2013
Total Posts: 829
09 Oct 2015 10:43 AM
I'm having problems with debounces to prevent click spamming.

Here is the first one:
local debounce = false

function boop(Player)
if not debounce then
debounce = true
wait (2.5)
if not Player.PlayerGui:FindFirstChild("Gui") then
local gui = script.Gui:clone()
gui.Parent = Player.PlayerGui
gui.LocalScript.Disabled = false
end
end)
script.Parent.ClickDetector.MouseClick:connect(boop)

Here is the second one:

local debounce = false

function hi(x)
if not debounce then
debounce = true
local y = x.Backpack
local z = game.Lighting["Candy"] --Change "Tool1" --Change "Tool1" to the name of the item.
wait (2.5)
z:Clone().Parent = y
debounce = false
end
end)

script.Parent.ClickDetector.MouseClick:connect(hi)
Report Abuse
xlaser23 is not online. xlaser23
Joined: 10 Dec 2011
Total Posts: 20341
09 Oct 2015 10:56 AM
http://wiki.roblox.com/index.php?title=Absolute_beginner%27s_guide_to_scripting



http://www.roblox.com/xla-item?id=290739801http://www.roblox.com/aser-item?id=290739819http://www.roblox.com/23-item?id=290739831 R$83 Tx2,599
Report Abuse
xKingDoge is online. xKingDoge
Joined: 03 Dec 2013
Total Posts: 829
09 Oct 2015 12:14 PM
bump
Report Abuse
xKingDoge is online. xKingDoge
Joined: 03 Dec 2013
Total Posts: 829
09 Oct 2015 01:01 PM
bump
Report Abuse
xKingDoge is online. xKingDoge
Joined: 03 Dec 2013
Total Posts: 829
09 Oct 2015 01:39 PM
bump
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