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 » Scripting Helpers
Home Search
 

Re: GUI : How do I fix this code?

Previous Thread :: Next Thread 
jhend27513 is not online. jhend27513
Joined: 17 Sep 2011
Total Posts: 3369
02 Apr 2013 07:12 PM

function onClicked(playerWhoClicked)
game.StarterGui.GuiMain.close.Transparency = 1
game.StarterGui.GuiMain.close.TextTransparency = 1
game.StarterGui.GuiMain.reset.Transparency = 1
game.StarterGui.GuiMain.reset.TextTransparency = 1
game.StarterGui.GuiMain.afk.Transparency = 1
game.StarterGui.GuiMain.afk.TextTransparency = 1
game.StarterGui.GuiMain.endafk.Transparency = 1
game.StarterGui.GuiMain.endafk.TextTransparency = 1
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)


Output is blank as well.
Report Abuse
StormRecon is not online. StormRecon
Joined: 15 Aug 2010
Total Posts: 2214
02 Apr 2013 07:14 PM
You mean BackgroundTransparency? Because Transparency isn't as property of gui objects
Report Abuse
jhend27513 is not online. jhend27513
Joined: 17 Sep 2011
Total Posts: 3369
02 Apr 2013 07:16 PM
Fixed that problem. This code still doesn't work.

function onClick(playerWhoClicked)
game.StarterGui.GuiMain.close.BackgroundTransparency = 1
game.StarterGui.GuiMain.close.TextTransparency = 1
game.StarterGui.GuiMain.reset.BackgroundTransparency = 1
game.StarterGui.GuiMain.reset.TextTransparency = 1
game.StarterGui.GuiMain.afk.BackgroundTransparency = 1
game.StarterGui.GuiMain.afk.TextTransparency = 1
game.StarterGui.GuiMain.endafk.BackgroundTransparency = 1
game.StarterGui.GuiMain.endafk.TextTransparency = 1
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)


Hey. I'm a siggy.
Report Abuse
StormRecon is not online. StormRecon
Joined: 15 Aug 2010
Total Posts: 2214
02 Apr 2013 07:21 PM
script.Parent.ClickDetector.MouseClick:connect(onClicked)

to

script.Parent.ClickDetector.MouseClick:connect(onClick)
Report Abuse
jhend27513 is not online. jhend27513
Joined: 17 Sep 2011
Total Posts: 3369
02 Apr 2013 07:23 PM
Got an output this time.
ClickDetector not a child of.

Should I add a click detector? In the close button. The others dont have them.

Hey. I'm a siggy.
Report Abuse
StormRecon is not online. StormRecon
Joined: 15 Aug 2010
Total Posts: 2214
02 Apr 2013 07:25 PM
Fix:


script.Parent.MouseButton1Click:connect(onClick)
Report Abuse
jhend27513 is not online. jhend27513
Joined: 17 Sep 2011
Total Posts: 3369
03 Apr 2013 10:23 AM
Okay, that works, Now I just need an open button.

I guess I just need to reverse the properties?

Hey. I'm a siggy.
Report Abuse
ohno1112 is not online. ohno1112
Joined: 23 Mar 2013
Total Posts: 833
03 Apr 2013 11:14 AM
yep :P
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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