yelloball
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 2749 |
|
|
| 21 Aug 2011 05:22 AM |
This is the script:
function onClick() script.Parent.Parent.Credittxt.Visible=true end script.Parent.MouseClick:connect(onClicked)
This is th Output:
Sun Aug 21 12:21:01 2011 - MouseClick is not a valid member of TextButton
|
|
|
| Report Abuse |
|
|
|
| 21 Aug 2011 05:24 AM |
You need to instance a clickdetector in your brick.
script.Parent.NAMEOFYOURCLICKDETECTOR.MouseClick:connect(onClick)
Note that you have onClicked between the parenthesis of the connection line, while you set onClick as the function's name. |
|
|
| Report Abuse |
|
|
yelloball
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 2749 |
|
| |
|
|
| 21 Aug 2011 05:31 AM |
For a gui, MouseButton1Click
~ Mitch ~ |
|
|
| Report Abuse |
|
|
yelloball
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 2749 |
|
|
| 21 Aug 2011 05:36 AM |
Noa it says
Sun Aug 21 12:37:03 2011 - attempt to call a nil value Sun Aug 21 12:37:03 2011 - Disconnected event because of exception |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2011 06:08 AM |
Why didn't you tell us it was a GUI? I'm going to rewrite this for you.
script.Parent.MouseButton1Click:connect(function() script.Parent.Parent.Credittxt.Visible=true end) |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
| |
|