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
|
  |
| Joined: 16 Oct 2009 |
| Total Posts: 1865 |
|
| |
|
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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|