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
 

Debounce not working...

Previous Thread :: Next Thread 
MisterScripter is not online. MisterScripter
Joined: 24 Sep 2010
Total Posts: 702
10 Dec 2012 08:51 PM
So I want this script to not break whenever the AdvancedGui is removed.
The connections are suppose to tell when a button is clicked in the AdvancedGui, but when the AdvancedGui is removed the script breaks because the connections could not find the buttons.

The debounce is suppose to allow connections but it does not work, or it works and it executes the function multiple times.

----------------------------------------------

enabled = true

if p.PlayerGui:FindFirstChild("AdvancedGui") and enabled == true then
enabled = true
script.Parent.AdvancedGui.StartFrame.Frame1.FButton1.MouseButton1Down:connect(clone)
script.Parent.AdvancedGui.StartFrame.Frame1.FButton2.MouseButton1Down:connect(message)
script.Parent.AdvancedGui.StartFrame.Frame1.FButton3.MouseButton1Down:connect(god)
script.Parent.AdvancedGui.StartFrame.Frame1.FButton4.MouseButton1Down:connect(sbomb)
script.Parent.AdvancedGui.StartFrame.Frame1.FButton5.MouseButton1Down:connect(noob_tube)
script.Parent.AdvancedGui.StartFrame.Frame1.FButton6.MouseButton1Down:connect(superspeed)
script.Parent.AdvancedGui.StartFrame.Frame1.FButton7.MouseButton1Down:connect(flag)
script.Parent.AdvancedGui.StartFrame.Frame1.FButton8.MouseButton1Down:connect(find)
script.Parent.AdvancedGui.StartFrame.Frame2.FButton1.MouseButton1Down:connect(black)
script.Parent.AdvancedGui.StartFrame.Frame2.FButton2.MouseButton1Down:connect(disco)
script.Parent.AdvancedGui.StartFrame.Frame2.FButton3.MouseButton1Down:connect(night)
script.Parent.AdvancedGui.StartFrame.Frame2.FButton4.MouseButton1Down:connect(normal)
script.Parent.AdvancedGui.StartFrame.Frame2.FButton5.MouseButton1Down:connect(discard)
script.Parent.AdvancedGui.StartFrame.Frame2.FButton6.MouseButton1Down:connect(pistol)
script.Parent.AdvancedGui.StartFrame.Frame2.FButton7.MouseButton1Down:connect(seatball)
script.Parent.AdvancedGui.StartFrame.Frame2.FButton8.MouseButton1Down:connect(epic)
script.Parent.AdvancedGui.StartFrame.Frame3.FButton1.MouseButton1Down:connect(leaderstats)
script.Parent.AdvancedGui.StartFrame.Frame3.FButton2.MouseButton1Down:connect(shield)
script.Parent.AdvancedGui.StartFrame.Frame3.FButton3.MouseButton1Down:connect(sbuilder)
script.Parent.AdvancedGui.StartFrame.Frame3.FButton4.MouseButton1Down:connect(low_grav)
script.Parent.AdvancedGui.StartFrame.Frame3.FButton5.MouseButton1Down:connect(jail)
script.Parent.AdvancedGui.StartFrame.Frame3.FButton6.MouseButton1Down:connect(noobpower)
script.Parent.AdvancedGui.StartFrame.Frame3.FButton7.MouseButton1Down:connect(troll)
script.Parent.AdvancedGui.StartFrame.Frame3.FButton8.MouseButton1Down:connect(zombify)
script.Parent.AdvancedGui.StartFrame.Frame4.FButton1.MouseButton1Down:connect(disconnect)
script.Parent.AdvancedGui.StartFrame.Frame4.FButton2.MouseButton1Down:connect(god_everyone)
script.Parent.AdvancedGui.StartFrame.Frame4.FButton3.MouseButton1Down:connect(ff)
script.Parent.AdvancedGui.StartFrame.Frame4.FButton4.MouseButton1Down:connect(freeze)
script.Parent.AdvancedGui.StartFrame.Frame4.FButton5.MouseButton1Down:connect(bomb_all)
script.Parent.AdvancedGui.StartFrame.Frame4.FButton6.MouseButton1Down:connect(kill_all)
script.Parent.AdvancedGui.StartFrame.Frame4.FButton7.MouseButton1Down:connect(teleport_all)
script.Parent.AdvancedGui.StartFrame.Frame4.FButton8.MouseButton1Down:connect(leaderstats_everyone)
script.Parent.AdvancedGui.StartFrame.Frame5.FButton1.MouseButton1Down:connect(anti_join)
script.Parent.AdvancedGui.StartFrame.Frame5.FButton2.MouseButton1Down:connect(flash)
script.Parent.AdvancedGui.StartFrame.Frame5.FButton3.MouseButton1Down:connect(rebalance)
script.Parent.AdvancedGui.StartFrame.Frame5.FButton4.MouseButton1Down:connect(credits)
script.Parent.AdvancedGui.StartFrame.Frame5.FButton5.MouseButton1Down:connect(running_time)
script.Parent.AdvancedGui.StartFrame.Frame5.FButton6.MouseButton1Down:connect(decal)
script.Parent.AdvancedGui.StartFrame.Frame5.FButton7.MouseButton1Down:connect(superjump_everyone)
script.Parent.AdvancedGui.StartFrame.Frame5.FButton8.MouseButton1Down:connect(superspeed_everyone)
else
enabled = false
end
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
10 Dec 2012 08:55 PM
O.E so inefficient, it hurts! D:. Please make it more efficient then come back with it, o.e.

For hippies: http://www.roblox.com/Peace-Shirt-TRANSPARENT-item?id=99429853
Report Abuse
gametastic100 is not online. gametastic100
Joined: 15 Jun 2011
Total Posts: 1286
10 Dec 2012 08:58 PM
Why are you commenting useless posts cease?
Report Abuse
MisterScripter is not online. MisterScripter
Joined: 24 Sep 2010
Total Posts: 702
10 Dec 2012 08:59 PM
I just need help because this script breaks whenever the gui is removed D;
Report Abuse
LUVMARIOLUIGI10000 is not online. LUVMARIOLUIGI10000
Joined: 16 May 2009
Total Posts: 1244
10 Dec 2012 09:01 PM
I answered your question in your last post.

~LUV, LuaLearners Teacher(+2)~
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
10 Dec 2012 09:01 PM
game, you just did, lol. I'm just saying because I can barely read this.

For hippies: http://www.roblox.com/Peace-Shirt-TRANSPARENT-item?id=99429853
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