Olama5
|
  |
| Joined: 31 Jan 2010 |
| Total Posts: 2827 |
|
|
| 20 Sep 2013 05:30 PM |
I am trying to make it where if you open one frame and another frame is open, it will close that frame.
Here is the Script:
Frame1 = game.StarterGui.Menu.Load Frame2 = game.StarterGui.Menu.New Frame = game.StarterGui.Menu.Options script.Parent.MouseButton1Click:connect(function() if Frame.Visible = true and Frame1.Visible = true then Frame1.Visible = false elseif Frame.Visible = true and Frame2.Visible = true then Frame2.Visible = false end) |
|
|
| Report Abuse |
|
|
Olama5
|
  |
| Joined: 31 Jan 2010 |
| Total Posts: 2827 |
|
| |
|
|
| 20 Sep 2013 05:47 PM |
Frame1 = game.StarterGui.Menu.Load Frame2 = game.StarterGui.Menu.New Frame = game.StarterGui.Menu.Options script.Parent.MouseButton1Click:connect(function() if Frame1.Visible == true and Frame2.Visible = true then Frame1.Visible = false elseif Frame1.Visible == false and Frame1.Visible = true then Frame2.Visible = false end end)
you forgot an end and when you ask an if statement you dont put one = you put 2 == |
|
|
| Report Abuse |
|
|
Olama5
|
  |
| Joined: 31 Jan 2010 |
| Total Posts: 2827 |
|
| |
|
Olama5
|
  |
| Joined: 31 Jan 2010 |
| Total Posts: 2827 |
|
|
| 20 Sep 2013 05:55 PM |
Output: then expected near '=' |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 20 Sep 2013 05:57 PM |
Very inefficient...
Frame1 = game.StarterGui.Menu.Load Frame2 = game.StarterGui.Menu.New Frame = game.StarterGui.Menu.Options script.Parent.MouseButton1Click:connect(function() if Frame.Visible then Frame1.Visible = not Frame.Visible Frame2.Visible = not Frame.Visible end
end) |
|
|
| Report Abuse |
|
|
Olama5
|
  |
| Joined: 31 Jan 2010 |
| Total Posts: 2827 |
|
| |
|
| |
|
Olama5
|
  |
| Joined: 31 Jan 2010 |
| Total Posts: 2827 |
|
|
| 20 Sep 2013 06:04 PM |
I believe he thought about Using an Open/Close script and making it where only 1 frame can be open!
|
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 20 Sep 2013 06:04 PM |
Meant Frame1.Visible = false and Frame2.Visible = false XD
I edited out something and I left the wrong things in there. My bad x_x
But if Frame.Visible then would work |
|
|
| Report Abuse |
|
|
|
| 20 Sep 2013 06:05 PM |
Frame1 = game.StarterGui.Menu.Load Frame2 = game.StarterGui.Menu.New Frame = game.StarterGui.Menu.Options script.Parent.MouseButton1Click:connect(function() if Frame1.Visible == true then Frame1.Visible = false elseif Frame1.Visible == false then Frame2.Visible = false end end)
try that
|
|
|
| Report Abuse |
|
|
Olama5
|
  |
| Joined: 31 Jan 2010 |
| Total Posts: 2827 |
|
| |
|
|
| 20 Sep 2013 06:07 PM |
or try this
Frame1 = game.StarterGui.Menu.Load Frame2 = game.StarterGui.Menu.New Frame = game.StarterGui.Menu.Options script.Parent.MouseButton1Click:connect(function() if Frame1.Visible == true and Frame2.Visible == false then Frame1.Visible = false Frame2.Visible = true elseif Frame1.Visible == false and Frame2.Visible == true then Frame2.Visible = false Frame1.Visible = true end end)
try that
|
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 20 Sep 2013 06:10 PM |
I get the problem... And btw @evolved it would work
Starting at the function()
Frame1.Visible = not Frame2.Visible
end)
done. |
|
|
| Report Abuse |
|
|
Olama5
|
  |
| Joined: 31 Jan 2010 |
| Total Posts: 2827 |
|
|
| 20 Sep 2013 06:14 PM |
It's Not working! Is this hard for you guys? |
|
|
| Report Abuse |
|
|
|
| 20 Sep 2013 06:16 PM |
@Olama How about you show us the model so we actually know the hierarchy of the script. You are clearly explaining something wrong to us. |
|
|
| Report Abuse |
|
|
Olama5
|
  |
| Joined: 31 Jan 2010 |
| Total Posts: 2827 |
|
|
| 20 Sep 2013 06:18 PM |
http://www.roblox.com/Galavin-Menu-item?id=130204666 This is the GUI!
|
|
|
| Report Abuse |
|
|
08C
|
  |
| Joined: 26 Jan 2013 |
| Total Posts: 847 |
|
| |
|
|
| 20 Sep 2013 06:29 PM |
| Isn't there a test mode in Studio... You can click the button all the scripts will run unless you use an event of fire the function on your own. |
|
|
| Report Abuse |
|
|
Olama5
|
  |
| Joined: 31 Jan 2010 |
| Total Posts: 2827 |
|
|
| 20 Sep 2013 06:31 PM |
I don't understand you correctly, but if what you said is:
I am trying to make it where if 1 frame is open and you open another, then that other frame will be invisible! Like: Frame1 is Opened Frame2 Opened Frame1 would become invisible
bets way I can explain it |
|
|
| Report Abuse |
|
|
|
| 20 Sep 2013 06:33 PM |
I noticed that afterwards. I fixed it. http://www.roblox.com/For-olama5-item?id=130206696 |
|
|
| Report Abuse |
|
|
Olama5
|
  |
| Joined: 31 Jan 2010 |
| Total Posts: 2827 |
|
|
| 20 Sep 2013 06:37 PM |
| Thank you CloneTrooper1019! |
|
|
| Report Abuse |
|
|