|
| 24 Jan 2017 08:47 PM |
Hello!
I'm having a trouble with my Surface Gui. I've made a "Buy Points" shop block, to where the player can Touch the block, or Click on it, to bring up the "Buy Points" Screen Gui. When I load the game up in Studio Play mode, I can click on the block and make the purchase just fine. However, when I load up a Local Server, or when I test my game on the Roblox site itself, I can't click on my Surface Gui shop block. I know this has to be a relatively simple thing to fix, but I'm at a loss for what.
This is the Output error I receive:
20:41:14.859 - PointsShop is not a valid member of PlayerGui 20:41:14.860 - Stack Begin 20:41:14.861 - Script 'Workspace.Lobby.ShopBlockPoints.ShopBlock.ClickOpenScript', Line 2 20:41:14.861 - Stack End
And here is my "ClickOpenScript" that's popping up as an error:
local function click(player) player.PlayerGui.PointsShop.ShopFrame.Visible = true --Line that gets the error end script.Parent.ClickDetector.mouseClick:connect(click)
I'm not sure why the Surface Gui functions fine in my Studio Play mode, but not when uploaded. Any help is much appreciated!
|
|
|
| Report Abuse |
|
|
| |
|
Jake0128
|
  |
| Joined: 09 Aug 2013 |
| Total Posts: 1631 |
|
|
| 24 Jan 2017 09:07 PM |
| Is PointsShop a direct descendent of the player's PlayerGui at the moment the click detector is clicked? |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2017 09:12 PM |
Yes. In my Explorer its:
StarterGui - PointsShop(SurfaceGui)
And inside Workspace, in the Lobby is:
ShopBlock(part) - ClickDetector, ClickOpenScript(script), TouchScrupt(script), SurfaceGui, TextBox.
Again, it works just fine when I do the Studio Play on my side, but not when its uploaded. :( |
|
|
| Report Abuse |
|
|
4ef
|
  |
| Joined: 27 May 2013 |
| Total Posts: 5633 |
|
|
| 24 Jan 2017 09:22 PM |
make a text button to click you can keep the click detector but it wont allow you to access the gui add a textbutton or something and keep the clickdetector it gives the same affect
|
|
|
| Report Abuse |
|
|
|
| 24 Jan 2017 09:37 PM |
The text button doesn't work when I add it to my Block or Surface Gui.
My Shop Gui itself is fine, its accessing it from clicking on a Block that's not working inside the Game, but DOES work when I Play it in Studio. |
|
|
| Report Abuse |
|
|
| |
|