|
| 11 Jul 2016 11:41 AM |
--Made by supermisstruth --Open/Close GUI script local button = script.Parent local text = script.Parent.Parent.Menu local openScreen = script.Parent.Parent.Parent.openScreen.Menu
button.MouseButton1Click:connect(function() --Doesnt print "clicked" when button is clicked print("Clicked") button.Visible = false text.Visible = false openScreen.Visible = true --The Button and the text will disapear because another GUI will open --When the user will close the newly opened GUI the button and the text will appear again end) |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2016 11:42 AM |
Try changing MouseButton1Click to MouseButton1Down
Speedy J. Zoel || Robux: R$1,312 || RAP: R$80,994 |
|
|
| Report Abuse |
|
|
| |
|
Egzekiel
|
  |
| Joined: 10 Jan 2011 |
| Total Posts: 1079 |
|
|
| 11 Jul 2016 02:41 PM |
Either your button is covered by another gui element or your variable is not well defined. I suggest you search for how to define the Local Player as a variable and know the name of its childrens.
Well, i'll help you.
--Must be in a Localscript local plr=game.Players.LocalPlayer local pg=plr.PlayerGui
Put the rest in here, don't forget to define the button and the open screen.
|
|
|
| Report Abuse |
|
|
|
| 11 Jul 2016 03:24 PM |
--Made by supermisstruth --Open/Close GUI script local plr=game.Players.LocalPlayer local pg=plr.PlayerGui local afkScreen = pg.MainGUI.afkScreen local imgButton = afkScreen.ImageButton local Menu = afkScreen.Menu
imgButton.MouseButton1Down:connect(function() --Doesnt print "clicked" when button is clicked print("Clicked") imgButton.Visible = false Menu.Visible = false --The Button and the text will disapear because another GUI will open --When the user will close the newly opened GUI the button and the text will appear again end) |
|
|
| Report Abuse |
|
|
| |
|
|
| 11 Jul 2016 03:48 PM |
| Maybe instead of using objects, you could make the button in your script. |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 11 Jul 2016 03:53 PM |
if there is a gui ontop of it, it wont fire.
|
|
|
| Report Abuse |
|
|
|
| 11 Jul 2016 06:47 PM |
| there is no GUI on top of it |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2016 07:10 PM |
@averysummer even if I made it out of scripts, what would be wrong with my script? |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2016 07:31 PM |
Your script should be working. I see nothing wrong with it. ~[When there is darkness, there is always light!]~
|
|
|
| Report Abuse |
|
|
|
| 11 Jul 2016 07:40 PM |
| I feel so dumb, i putted my imgButton into a frame >.< |
|
|
| Report Abuse |
|
|