cutechad
|
  |
| Joined: 12 Jan 2011 |
| Total Posts: 96 |
|
|
| 29 Sep 2015 07:57 PM |
Hello I am currently making a mmorpg type game and I need to make a Inv Gui so I had to start with actually making it open so I made the script but its not working, could someone help me out with my problem?VVV5 Box = script.Parent.Box Button = script.Parent.Button Open = false
Button.MouseButton1Down:connect(function(open) if Open == False then Button.Text = "Close" Box.Visible = true Open = true elseif Open == true then Button.Text = "Open" Box.Visible = false Open = false end end)
|
|
|
| Report Abuse |
|
|
|
| 29 Sep 2015 08:09 PM |
| Please, go to the Scripters forum. You'll get better luck there. |
|
|
| Report Abuse |
|
|
|
| 29 Sep 2015 08:13 PM |
| The scripting forum isn't for help requests, so he came to the wright place, only problem is I'm not the right guy. |
|
|
| Report Abuse |
|
|
| |
|
galio13
|
  |
| Joined: 20 Jul 2011 |
| Total Posts: 842 |
|
|
| 01 Oct 2015 08:18 AM |
Box = script.Parent.Box Button = script.Parent.Button Open = false
Button.MouseButton1Down:connect(function(open) if Open == false then -- you had a big "f" in false Button.Text = "Close" Box.Visible = true Open = true elseif Open == true then Button.Text = "Open" Box.Visible = false Open = false end end) |
|
|
| Report Abuse |
|
|
Fariz97
|
  |
| Joined: 15 Sep 2010 |
| Total Posts: 214 |
|
|
| 01 Oct 2015 02:28 PM |
[Reason] for bools, true and false, the first letter has to be a lowercase letter. [Solution] Box = script.Parent.Box Button = script.Parent.Button Open = false
Button.MouseButton1Down:connect(function(open) if Open == false then Button.Text = "Close" Box.Visible = true Open = true elseif Open == true then Button.Text = "Open" Box.Visible = false Open = false end end)
[Transition Fade in or out *Im Assuming BOX has no child* Button.MouseButton1Down:connect(function(open) if Open == false then Button.Text = "Close" for i = 1,10 do Box.BackgroundTransparency = Box.BackgroundTransparency +.1 wait(.1) end Open = true elseif Open == true then Button.Text = "Open" for i = 1,10 do Box.BackgroundTransparency = Box.BackgroundTransparency -.1 wait(.1) Open = false end |
|
|
| Report Abuse |
|
|