| |
|
| |
|
LordZonia
|
  |
| Joined: 04 Dec 2011 |
| Total Posts: 50 |
|
|
| 07 May 2013 01:49 PM |
function random(mouse)
script.(INSERT LOCATION OF GUI YOU WANT TO OPEN HERE).visible = true script.Parent.Text = "Close" end
or something like that, I think. |
|
|
| Report Abuse |
|
|
| |
|
Dr01d3k4
|
  |
| Joined: 11 Oct 2007 |
| Total Posts: 17916 |
|
|
| 07 May 2013 02:20 PM |
| There's no problem with the code. What does the output say? |
|
|
| Report Abuse |
|
|
| |
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
| |
|
| |
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 07 May 2013 02:45 PM |
| Not enough or something? Its not the script. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 08 May 2013 12:01 AM |
| Is the gui positioned/sized right? Is the Transparency 1? Check everything, |
|
|
| Report Abuse |
|
|
| |
|
chris1989
|
  |
| Joined: 30 Nov 2007 |
| Total Posts: 2520 |
|
|
| 08 May 2013 12:21 AM |
| ScreenGui's do not have a 'Visible' property you have 1 to many parents. |
|
|
| Report Abuse |
|
|
chris1989
|
  |
| Joined: 30 Nov 2007 |
| Total Posts: 2520 |
|
|
| 08 May 2013 12:23 AM |
| Oh forget my last post. Use :findFirstChild("Inventory") the capitol f is breaking it. |
|
|
| Report Abuse |
|
|
|
| 08 May 2013 12:34 AM |
FindFirstChild and findFirstChild, both work the same. That is not the error. If it was, we would have an output.
Is the frame Visible? Is the Transparency = 1? Is the size greater then (0, 0, 0, 0)? Is the position on screen? |
|
|
| Report Abuse |
|
|
|
| 08 May 2013 12:35 AM |
Is the script Enabled..?
Maybe the script is loading BEFORE the frame? But that would throw an error. |
|
|
| Report Abuse |
|
|
|
| 08 May 2013 12:37 AM |
Run this--
print ("Script Loaded") function onClicked() print ("Button was pressed") local open = script.Parent.Parent.Parent:FindFirstChild("Inventory") print ("Found "..open.Name.."") open.Visible = true print (""..open.Name.." is now Visible") end print ("Script end") script.Parent.MouseButton1Click:connect(onClicked)
--I added prints. Once you run this, Copy and paste your Output window to this thread. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 08 May 2013 01:38 PM |
function onClick()
local open = script.Parent.Parent.Parent:FindFirstChild("Inventory") if open then
open.Visible = true
end
script.Parent.MouseButton1Down:connect(onClick)
Try this.
|
|
|
| Report Abuse |
|
|
Dr01d3k4
|
  |
| Joined: 11 Oct 2007 |
| Total Posts: 17916 |
|
|
| 08 May 2013 01:38 PM |
| What is the className of script.Parent? |
|
|
| Report Abuse |
|
|
|
| 08 May 2013 02:20 PM |
Oh I see.
script.Parent.MouseButton1Click:connect(onClicked)
It should be MouseButton1Down, not click. |
|
|
| Report Abuse |
|
|
| |
|
Dr01d3k4
|
  |
| Joined: 11 Oct 2007 |
| Total Posts: 17916 |
|
| |
|