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 Scripting

Previous Thread :: Next Thread 
BetaWolfE is not online. BetaWolfE
Joined: 07 Mar 2011
Total Posts: 63
25 Jul 2011 01:22 PM
My button script won't work. Help?

Code:

function onClick()
game.StarterGui.HelpGui.Frame.HelpText.Visible = true
end

script.Parent.MouseButton1Down:connect(click)

Report Abuse
yoyoman2 is not online. yoyoman2
Joined: 07 Mar 2009
Total Posts: 2170
25 Jul 2011 01:26 PM
i think its like this:


function onClick()
game.StarterGui.HelpGui.Frame.HelpText.Visible = true
end

script.Parent.MouseButton1Click:connect(click)

Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
25 Jul 2011 01:28 PM
lolnope

Put this in a LocalScript

function onClick()
game.Players.LocalPlayer.PlayerGui.Frame.HelpText.Visible = true
end
script.Parent.MouseButton1Click:connect(onClick)
Report Abuse
BetaWolfE is not online. BetaWolfE
Joined: 07 Mar 2011
Total Posts: 63
25 Jul 2011 01:29 PM
In a LocalScript or regular?
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
25 Jul 2011 01:29 PM
Put mine in a localscript
Report Abuse
BetaWolfE is not online. BetaWolfE
Joined: 07 Mar 2011
Total Posts: 63
25 Jul 2011 01:30 PM
@Swim

It's in StarterGui, not PlayerGui.
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
25 Jul 2011 01:31 PM
Yes, but when someone enters the game, everything in StarterGui is copied and put in their PlayerGui automatically. If you change things in the StarterGui, nothing will happen. If you change things in people's PlayerGui's, then you can see what changes.
Report Abuse
BetaWolfE is not online. BetaWolfE
Joined: 07 Mar 2011
Total Posts: 63
25 Jul 2011 01:32 PM
Ok. Thanks. Let me test it real quick.
Report Abuse
BetaWolfE is not online. BetaWolfE
Joined: 07 Mar 2011
Total Posts: 63
25 Jul 2011 01:35 PM
It didn't work.
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
25 Jul 2011 01:36 PM
Hold up, are all of the GUI's in a ScreenGui? I saw

PlayerGui.Frame

Is the ScreenGui named Frame?
Report Abuse
BetaWolfE is not online. BetaWolfE
Joined: 07 Mar 2011
Total Posts: 63
25 Jul 2011 01:38 PM
Look in my models for a model that says HelpGUI.
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
25 Jul 2011 01:50 PM
Ok, first problem:

Your 'Help' textbutton has the size of UDim2.new(0,0,0,0) meaning, it basically doesn't exist. Hence, nothing happens when you click it. Because it's not actually there.

Second:

Not really a problem, but Frame doesn't really need to be there. You can make your textbutton look like that.

Third:
You can just use script.Parent instead of game.Players.LocalPlayer.blablabla

Last:

DO NOT USE TEXTBOXES FOR SHOWING TEXT! Major unhappyness results from this. Use TextLabels instead. Textboxes are editable, meaning people can type in them. TextLabels just sit there and show text.

I'm not going to give you the fixed version, I want to see if you can do it yourself :)
Report Abuse
BetaWolfE is not online. BetaWolfE
Joined: 07 Mar 2011
Total Posts: 63
25 Jul 2011 01:54 PM
OK thanks

xD
Report Abuse
BetaWolfE is not online. BetaWolfE
Joined: 07 Mar 2011
Total Posts: 63
25 Jul 2011 01:58 PM
Wait, what would the size be then?
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
25 Jul 2011 02:00 PM
Same size of the Frame, which you don't need.
Report Abuse
BetaWolfE is not online. BetaWolfE
Joined: 07 Mar 2011
Total Posts: 63
25 Jul 2011 02:03 PM
Ok. One last question, the frame of the button or the frame of the text?
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
25 Jul 2011 02:05 PM
You don't need the frame around the button. But the way you have it set up, if you delete it, you'll delete everything you've done. So copy everything in the frame, delete the frame, and paste everything back in the ScreenGui.
Report Abuse
BetaWolfE is not online. BetaWolfE
Joined: 07 Mar 2011
Total Posts: 63
25 Jul 2011 02:11 PM
Ok. I did that. But it still doesn't work. I can click the button but the text won't pop up.
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
25 Jul 2011 02:16 PM
*cough*script.Parent.HelpText.Visible = true*cough*
Report Abuse
BetaWolfE is not online. BetaWolfE
Joined: 07 Mar 2011
Total Posts: 63
25 Jul 2011 02:19 PM
Lol. I had that EXACT same code. But, I deleted it cause I thought it wouldn't work. xD. Thank you so much. It works!
Report Abuse
BetaWolfE is not online. BetaWolfE
Joined: 07 Mar 2011
Total Posts: 63
25 Jul 2011 02:23 PM
Now I gotta make the close button xD
Report Abuse
ultralegomaster5096 is not online. ultralegomaster5096
Joined: 17 Jan 2011
Total Posts: 4351
25 Jul 2011 02:30 PM
Take above code, and reverse the true, put it as false, and put it into ur close button xD

-PostBumped
Report Abuse
BetaWolfE is not online. BetaWolfE
Joined: 07 Mar 2011
Total Posts: 63
25 Jul 2011 02:33 PM
Too bad that didn't work xD
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
25 Jul 2011 02:33 PM
*cough*script.Parent.Parent.Visible = false*cough*
Report Abuse
nightmare3o is not online. nightmare3o
Joined: 21 Jun 2008
Total Posts: 956
25 Jul 2011 02:37 PM
@swim

Pretty bad cold you got there O_o
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