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: so I have a script to detect if another gui is open

Previous Thread :: Next Thread 
crazyawsomejames is not online. crazyawsomejames
Joined: 16 Apr 2012
Total Posts: 16167
25 Sep 2016 04:20 PM
and if it is, the gui trying to be activated won't open
however, it just doesn't work at all and doesn't give an error
script:

Box = script.Parent.Parent.CreditButton.CreditText
Button = script.Parent.Parent.CreditButton
GUI2 = game.StarterGui.List.Box.FAQButton.FAQText
GUI3 = game.StarterGui.List.Box.ShopButton.Frame

Button.MouseButton1Down:connect(function()
if not(GUI2.Visible) and not(GUI3.Visible) then <-- part thats supposed to detect
Box.Visible = not Box.Visible
if Box.Visible then
Button.Text = "Close"
else
Button.Text = "Credits"
end
end
end)


im not sure whats wrong, but im not sure what other approach to take on this
Report Abuse
crazyawsomejames is not online. crazyawsomejames
Joined: 16 Apr 2012
Total Posts: 16167
25 Sep 2016 04:27 PM
b1
Report Abuse
crazyawsomejames is not online. crazyawsomejames
Joined: 16 Apr 2012
Total Posts: 16167
25 Sep 2016 04:36 PM
b2
Report Abuse
Wunder_Wulfe is not online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
25 Sep 2016 04:37 PM
"GUI2 = game.StarterGui.List.Box.FAQButton.FAQText
GUI3 = game.StarterGui.List.Box.ShopButton.Frame"
" game.StarterGui"
http://wiki.roblox.com/index.php?title=API:Class/PlayerGui
http://wiki.roblox.com/index.php?title=API:Class/StarterGui
Report Abuse
crazyawsomejames is not online. crazyawsomejames
Joined: 16 Apr 2012
Total Posts: 16167
25 Sep 2016 04:42 PM
@wunder
thanks
I implemented the playergui in and now it works
:^)
Report Abuse
crazyawsomejames is not online. crazyawsomejames
Joined: 16 Apr 2012
Total Posts: 16167
25 Sep 2016 04:49 PM
quick question, however
I have two of the GUIs in localscripts and they work fine
but one is in a regular script
and I used the command from the wiki for server scripts but it says "PlayerName is not a valid member of Players"
any ideas on how to fix this?
Report Abuse
Wunder_Wulfe is not online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
25 Sep 2016 04:51 PM
"one is in a regular script "

no

guis should only have local scripts in them

and thats because you are doing

Players.PlayerName

not

Players[PlayerName]

i recommend Players:FindFirstChild(PlayerName)
Report Abuse
crazyawsomejames is not online. crazyawsomejames
Joined: 16 Apr 2012
Total Posts: 16167
25 Sep 2016 04:54 PM
the gui doesn't work in the actual server when I use a local script though
I posted on the forums awhile ago and someone told me that was why
if I have to use a local script, I dont know how to make the gui work at all

Report Abuse
crazyawsomejames is not online. crazyawsomejames
Joined: 16 Apr 2012
Total Posts: 16167
25 Sep 2016 05:04 PM
everything works flawlessly in studio
and then in the actual server the shop gui won't open at all, the faq is broken, and only one gui functions properly

I really dont know what to do from here
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