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

Previous Thread :: Next Thread 
froggodude is not online. froggodude
Joined: 22 Sep 2012
Total Posts: 1638
29 Nov 2012 05:30 PM
Please don't be a jerk on this, this is my first complicated script. I have made one before but that one was easy. This script is meant to be in a textbutton. the "bin.parent.parent.parent.parent.shopgui.visible = true" is to locate the shopgui. I need debuggers if there is anything wrong with it:

print 'Open/Closescript'
bin = script.Parent

function Clicked ()
if bin.MouseButton1Down then
bin.Parent.Text = "Click here to close the shop"
bin.Parent.Parent.Parent.Parent.ShopGui.Frame.Visible = true
end
else bin.MouseButton2Down then
bin.Parent.Text = "Click here to open the shop"
bin.Parent.Parent.Parent.Parent.ShopGui.Frame.Visible = false
end
bin.MouseButton1Down:connect(Clicked)
bin.Mousebutton2Down:disconnect(Clicked)
Report Abuse
crouton04 is not online. crouton04
Joined: 07 Jul 2010
Total Posts: 4459
29 Nov 2012 05:32 PM
print 'Open/Closescript'
bin = script.Parent

function Clicked ()
if bin.MouseButton1Down then
bin.Parent.Text = "Click here to close the shop"
bin.Parent.Parent.Parent.Parent.ShopGui.Frame.Visible = true
else bin.MouseButton2Down then
bin.Parent.Text = "Click here to open the shop"
bin.Parent.Parent.Parent.Parent.ShopGui.Frame.Visible = false
end
end
bin.MouseButton1Down:connect(Clicked)
bin.Mousebutton2Down:disconnect(Clicked) ... idk...
Report Abuse
froggodude is not online. froggodude
Joined: 22 Sep 2012
Total Posts: 1638
29 Nov 2012 05:35 PM
you didn't find anything wrong with it?
Report Abuse
crouton04 is not online. crouton04
Joined: 07 Jul 2010
Total Posts: 4459
30 Nov 2012 09:52 PM
One end was missplaced. Thats it :3
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
30 Nov 2012 09:55 PM
    print 'Open/Closescript'
    local bin = script.Parent
    local clicked = false
    
    bin.MouseButton1Down:connect(function()
    if not clicked then
    bin.Parent.Text = "Click here to close the shop"
    bin.Parent.Parent.Parent.Parent.ShopGui.Frame.Visible = true
    else
    bin.Parent.Text = "Click here to open the shop"
    bin.Parent.Parent.Parent.Parent.ShopGui.Frame.Visible = false
    end
    clicked = not clicked
    end)

¤¤ †KMXD† ¤¤
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