IciFlame
|
  |
| Joined: 28 Sep 2013 |
| Total Posts: 300 |
|
|
| 13 Jul 2015 06:49 PM |
This is a ImageButton that is supposed to make a Frame transparent when clicked. But it does not work. This is the script:
function onClicked() script.Parent.Parent.Parent.Brightness.BackgroundTransparency = 0.5 end script.Parent:connect(onClicked)
any help? |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2015 06:51 PM |
script.Parent.MouseButton1Down:connect(function() script.Parent.Parent.Parent.Brightness.BackgroundTransparency = 0.5 end |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2015 06:52 PM |
function onClicked() script.Parent.Parent.Parent.Brightness.BackgroundTransparency = 0.5 end script.Parent.MouseButton1Down:connect(onClicked) |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2015 06:55 PM |
MouseButton1Down is the event for clicking so your connection should be
script.Parent.MouseButton1Down:connect(onClicked)
you see
MouseButton1 is left mouse button the one ya click with
MouseButton1Down means when you click down that button it will trigger a function
That function is onClicked function
Which is
script.Parent.Parent.Parent.Brightness.BackgroundTransparency = 0.5 end
This is called magic. |
|
|
| Report Abuse |
|
|