|
| 29 Apr 2012 11:01 AM |
It's a Menu gui with 4 options: 'Story', 'Instructions', 'Bio' and 'Play Game'.
When you click story, instructions or bio they will appear or if they are already visible they will disappear, so they are all working fine. But when I tried to script the 'Play Game' it didn't work.
Here is the script:
"function onClicked(mouse) script.Parent.Parent.Visible = false end
script.Parent.MouseButton1Click:connect(Clicked)"
script.Parent.Parent is the frame with all of the GUIs that make up the Menu. Why is it not working? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
| |
|
|
| 29 Apr 2012 11:56 AM |
function onClicked(mouse) script.Parent.Parent.Visible = false end
script.Parent.MouseButton1Click:connect(onClicked) --Ful name duh.. |
|
|
| Report Abuse |
|
|
|
| 29 Apr 2012 12:02 PM |
| Thank you so much. I'm always making the most simple mistakes. |
|
|
| Report Abuse |
|
|
jobro13
|
  |
| Joined: 05 Aug 2009 |
| Total Posts: 2865 |
|
|
| 29 Apr 2012 12:03 PM |
| Why the... did you make it a string? |
|
|
| Report Abuse |
|
|
DawgINC
|
  |
| Joined: 27 Apr 2012 |
| Total Posts: 156 |
|
|
| 29 Apr 2012 09:56 PM |
| I did that one time and it took me 2a days to figure it out on another account |
|
|
| Report Abuse |
|
|
ICSM1020
|
  |
| Joined: 09 Mar 2011 |
| Total Posts: 14277 |
|
|
| 30 Apr 2012 01:20 AM |
| Your all wrong! There's no such thing as 'MouseButton1Click'. It's 'MouseButton1Down'! |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2012 01:26 AM |
^ Really?
http://wiki.roblox.com/index.php/MouseButton1Click |
|
|
| Report Abuse |
|
|
| |
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 30 Apr 2012 03:26 AM |
MouseButton1Down is for handles.... like sparkles when MouseButton1Down
MouseButton1Click is for gui's for example |
|
|
| Report Abuse |
|
|
Gojira34
|
  |
| Joined: 28 Dec 2009 |
| Total Posts: 1040 |
|
|
| 30 Apr 2012 03:41 AM |
| Actually they are interchangeable. As far as I can see you can use both. I personally use MouseButton1Down. |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2012 05:50 AM |
| MouseButton1Click is only affected at the moment you click it - while MouseButton1Down also lets you run the script while you hold it down. Good for draggers, moving-GUIs etc. |
|
|
| Report Abuse |
|
|
DawgINC
|
  |
| Joined: 27 Apr 2012 |
| Total Posts: 156 |
|
|
| 30 Apr 2012 01:09 PM |
| I see now I didnt pay attention to that part of the script I prefer MouseButton1Down I agree but it can be used as the example above MouseButton1Down is good for dragging while MouseButton1Click is for a quick click. |
|
|
| Report Abuse |
|
|