|
| 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
|
  |
| 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 |
|
|
|
| 29 Nov 2012 05:35 PM |
| you didn't find anything wrong with it? |
|
|
| Report Abuse |
|
|
crouton04
|
  |
| Joined: 07 Jul 2010 |
| Total Posts: 4459 |
|
|
| 30 Nov 2012 09:52 PM |
| One end was missplaced. Thats it :3 |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|