|
| 03 May 2015 07:07 PM |
---BACKGROUND--- I am creating a game, and created a basic GUI shop. Everything was working fine, the images, the scripts, the text. It was tested online and offline. Then, after attempting to fix some other bugs, I tested the game, and clicked the Shop button. It flashed and did nothing. What went wrong?
---THE ERROR--- For the GUI I did: StarterGUI --> ScreenGUI --> Frame --> ImageButton --> Script The Script is as follows:
--------------------------------------------------------------------------------- function open() script.Parent.Visible = true end
script.Parent.MouseButton1Down:connect(open) ---------------------------------------------------------------------------------
--CONCLUSION-- So, what went wrong? Is there something wrong with this script? Is there something possibly something wrong with another script? Like I mentioned before, I am a basic programmer. Thanks in advance for the help. |
|
|
| Report Abuse |
|
|
|
| 03 May 2015 07:09 PM |
I have
function die() script.Parent.Visible = false script.Parent.Parent.Parent.ShopFrame.Visible = true wait() end script.Parent.MouseButton1Down:connect(die)
In my shop, try to make changes with mine I suppose |
|
|
| Report Abuse |
|
|
|
| 03 May 2015 07:16 PM |
| Thanks for the reply, however this script did not help resolve the issue. You can click on the shop ImageButton, but nothing will happen. Any other suggestions? |
|
|
| Report Abuse |
|
|
|
| 03 May 2015 07:18 PM |
| When you were fixing the bugs in your game did you make any changes to the shop, if so what kind of changes? |
|
|
| Report Abuse |
|
|
|
| 04 May 2015 05:43 PM |
The only changes I made to the Shop GUI were:
1) Changed the Image Objects to match the image of what you're buying. 2) Changed the names of the TextBox and TextButton objects. 3) Changed the script of the TextButton object to set the price.
So, I really didn't change all that much.
|
|
|
| Report Abuse |
|
|
|
| 04 May 2015 05:46 PM |
script.Parent.MouseButton1Down:connect(function(Click) script.Parent.Visible = true end) |
|
|
| Report Abuse |
|
|
| |
|
|
| 04 May 2015 05:54 PM |
| Nope, it didn't work. Is there anything else I needed to add to that script? Or any other suggestions. |
|
|
| Report Abuse |
|
|
|
| 04 May 2015 05:56 PM |
| Oh, I got it to work! I put the LocalScript in the wrong location. Thanks for your help everyone! :D |
|
|
| Report Abuse |
|
|
|
| 04 May 2015 05:59 PM |
| All I have to say is.... Fail. |
|
|
| Report Abuse |
|
|
|
| 04 May 2015 06:01 PM |
| No, I mean I put your LocalScript in the wrong location. |
|
|
| Report Abuse |
|
|