|
| 05 Nov 2012 04:15 PM |
so I have in The StarterGui a ScreenGui and in the screengui there is, Frame,Frame1, and close/openbutton. So i tested my place and my close/open button works when it is on Frame but when I click my next button, and i try to close and open Frame1 nothing happens. here is my script (help?):
function onClicked() script.Parent.Parent["Frame"].Visible = not script.Parent.Parent["Frame"].Visible end
script.Parent.MouseButton1Click:connect(onClicked) |
|
|
| Report Abuse |
|
|
|
| 05 Nov 2012 04:16 PM |
| If your parenting is correct, the only error I can find is that no "." is needed after you say ["Frame"] |
|
|
| Report Abuse |
|
|
|
| 05 Nov 2012 04:18 PM |
| actully i think i miss worded it. this works for Frame but i need it to also work for Frame1. |
|
|
| Report Abuse |
|
|
| |
|
|
| 05 Nov 2012 04:59 PM |
function onClicked() if script.Parent.Parent["Frame"].Visible == true then script.Parent.Parent["Frame"].Visible = false end if script.Parent.Parent["Frame"].Visible == false then script.Parent.Parent["Frame"].Visible = true end end
script.Parent.MouseButton1Down:connect(onClicked) |
|
|
| Report Abuse |
|
|