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 Issues

Previous Thread :: Next Thread 
Rapster2 is not online. Rapster2
Joined: 16 Oct 2009
Total Posts: 1865
15 Dec 2013 11:51 AM
I have a SurfaceGui, and I want a gui to pop up and fill the entire screen when I click on it. My output doesn't say anything's wrong, but when I click on the SurfaceGui, it does nothing. I have made sure it is active, as well. Here's my code:

function open()
gui = Instance.new("ScreenGui", StarterGui)
frame = Instance.new("Frame", gui)
pic = Instance.new("ImageButton", frame)
text = Instance.new("TextButton", frame)
gui.Name = "InfoGui"
gui.Active = true
gui.Enabled = true
frame.Position = UDim2.new(0,0,0,0)
frame.Size = UDim2.new(1,0,1,0)
frame.Active = true
frame.BackgroundColor3 = Color3.new(r/255,g/128,b/0)
pic.Image = "rbxassetid://138532854"
pic.Active = true
text.Text = "The Lifter"
text.BackgroundTransparency = 1
text.TextXAlignment = "Center"
text.TextYAlignment = "Bottom"
text.TextColor3 = Color3.new(r/0,g/0,b/0)
end

script.Parent.Frame.TextButton.MouseButton1Click:connect(open)
Report Abuse
Rapster2 is not online. Rapster2
Joined: 16 Oct 2009
Total Posts: 1865
15 Dec 2013 12:04 PM
b1
Report Abuse
Rapster2 is not online. Rapster2
Joined: 16 Oct 2009
Total Posts: 1865
15 Dec 2013 12:17 PM
b2

I'm not a great scripter, I just started learning very recently. I need this script to work for my place I'm building.
Report Abuse
Rapster2 is not online. Rapster2
Joined: 16 Oct 2009
Total Posts: 1865
15 Dec 2013 12:32 PM
b3

Come on, I'm sure there's a simple fix to this, I'm just not good enough of a scripter to fix it.
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
15 Dec 2013 12:41 PM
You're parenting the ScreenGui to the StarterGui when instead it should be parented to the Player's PlayerGui.
Report Abuse
Rapster2 is not online. Rapster2
Joined: 16 Oct 2009
Total Posts: 1865
15 Dec 2013 03:55 PM
Ohh, ok. How would I make sure to parent it to the player who clicked the button's PlayerGui?
Report Abuse
Rapster2 is not online. Rapster2
Joined: 16 Oct 2009
Total Posts: 1865
15 Dec 2013 04:20 PM
b1 Anyone? How do I parent it to the PlayerGui of the person who clicked the GUI?
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
15 Dec 2013 08:44 PM
hmm... good question. I'm not sure how you would get the player who clicked... The only way I can think is to have that SurfaceGui in the StarterGui and set its Adornee property to the part to be displayed on, then just do game.Players.LocalPlayer to get the player who clicked.
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