EdgyIan
|
  |
| Joined: 14 Oct 2016 |
| Total Posts: 2176 |
|
|
| 05 Jul 2017 08:32 PM |
In an obby that I'm making, there is an opening message once you join the game saying what to do. I made it where you can close the message and when you do a shop button will appear (because it's invisible when the message is open) in the bottom left corner of the screen. It works, but whenever you die, the opening message opens up again and the shop button becomes invisible again as if you left and re-joined the game. It does this even though I said in a script once the player closes the message the GUI will be destroyed because the message is meant to never be opened again. The shop button is also supposed to be visible for the entirety of the game once the message has been closed. I looked in the output and there are no errors, and I've tried to fix this multiple ways. But I can't seem to find the problem. Can anyone help me with this issue?
|
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 05 Jul 2017 08:33 PM |
make sure the gui is destroyed in startergui too
R$130 |
|
|
| Report Abuse |
|
|
EdgyIan
|
  |
| Joined: 14 Oct 2016 |
| Total Posts: 2176 |
|
|
| 05 Jul 2017 08:36 PM |
This is the script:
local OGUI = script.Parent.Parent.Parent local SB = script.Parent.Parent.Parent.Parent:WaitForChild("ShopButtonGUI").ShopButton
script.Parent.MouseButton1Click:connect(function() OGUI:Destroy() SB.Visible = true end)
|
|
|
| Report Abuse |
|
|
|
| 05 Jul 2017 08:36 PM |
| Go to StarterGUI and disable ResetPlayerGuiOnSpawn |
|
|
| Report Abuse |
|
|
EdgyIan
|
  |
| Joined: 14 Oct 2016 |
| Total Posts: 2176 |
|
|
| 05 Jul 2017 08:37 PM |
Also, it's still in the StarterGUI even when closed when it's supposed to be destroyed. I scripted it to destroy the entire GUI in StarterGUI.
|
|
|
| Report Abuse |
|
|
EdgyIan
|
  |
| Joined: 14 Oct 2016 |
| Total Posts: 2176 |
|
|
| 05 Jul 2017 08:38 PM |
Thank Christ. I should've researched more. Thanks.
|
|
|
| Report Abuse |
|
|