generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Can't Click on Surface Gui in Local Server

Previous Thread :: Next Thread 
ScribeOfTheEndless is not online. ScribeOfTheEndless
Joined: 17 Sep 2016
Total Posts: 102
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
Disillusions is not online. Disillusions
Joined: 10 Jul 2011
Total Posts: 6365
24 Jan 2017 09:01 PM
why r u obc?


Report Abuse
Jake0128 is not online. 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
ScribeOfTheEndless is not online. ScribeOfTheEndless
Joined: 17 Sep 2016
Total Posts: 102
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 is not online. 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
ScribeOfTheEndless is not online. ScribeOfTheEndless
Joined: 17 Sep 2016
Total Posts: 102
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
ScribeOfTheEndless is not online. ScribeOfTheEndless
Joined: 17 Sep 2016
Total Posts: 102
24 Jan 2017 11:30 PM
Bump.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image