|
| 02 Sep 2016 01:57 PM |
for whatever reason, I cant get my Gui TextButtons to function anymore. Has the connect command changed?
-----script example-----
function Click1() print("Clicked") end
script.Parent.Option1.MouseButton1Click:connect(Click1) ------------------------- |
|
|
| Report Abuse |
|
|
|
| 02 Sep 2016 01:59 PM |
script.Parent.Option1.MouseButton1Down:connect(function() print("Clicked") end)
|
|
|
| Report Abuse |
|
|
iYzarky
|
  |
| Joined: 01 Jun 2009 |
| Total Posts: 1271 |
|
|
| 02 Sep 2016 02:00 PM |
whatever.MouseButton1Down:connect(function() --stuff here end)
I don't even care hummie |
|
|
| Report Abuse |
|
|
|
| 02 Sep 2016 02:01 PM |
Also, don't use MouseButton1Click, use MouseButton1Down.
|
|
|
| Report Abuse |
|
|
|
| 02 Sep 2016 02:01 PM |
| That didn't work for me earlier either. Before you ask, Yes I have made sure that everything is accurate. That's why I'm asking, Did something change? |
|
|
| Report Abuse |
|
|
|
| 02 Sep 2016 02:02 PM |
| excellent. so it did change. it's now MouseClick1Down. Thank you both. ^_^ |
|
|
| Report Abuse |
|
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 02 Sep 2016 02:03 PM |
'don't use MouseButton1Click, use MouseButton1Down.'
Wrong. You can use both. It just depends on if you want the function to run after the first mouse press, or after a full click.
|
|
|
| Report Abuse |
|
|
|
| 02 Sep 2016 02:04 PM |
it didn't change for me... this still works.
function onClick() script.Parent.Visible = false script.Parent.Parent.Parent.Cargo.Visible = true script.Parent.Parent.CargoHoldClose.Visible = true end
script.Parent.MouseButton1Click:connect(onClick) |
|
|
| Report Abuse |
|
|
|
| 02 Sep 2016 02:06 PM |
"Wrong. You can use both. It just depends on if you want the function to run after the first mouse press, or after a full click." I was just suggesting.
|
|
|
| Report Abuse |
|
|
|
| 02 Sep 2016 02:06 PM |
Still not working frustratingly enough... ------- script.Parent.Option1.MouseButton1Down:connect(function() print("Clicked") end) -------- |
|
|
| Report Abuse |
|
|
| |
|
|
| 02 Sep 2016 02:08 PM |
must be a system error.
I'm going to triple check the Ancestry. Thank you for all your comments. |
|
|
| Report Abuse |
|
|
|
| 02 Sep 2016 02:09 PM |
| nothing shows up wrong on output. |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 02 Sep 2016 02:09 PM |
Make sure the gui is an ImageButton or TextButton and make sure you are using a local script
--local script
local gui = script.Parent local option = gui:WaitForChild('Option1')
option.MouseButton1Click:connect(function() print('Clicked') end)
|
|
|
| Report Abuse |
|
|
|
| 02 Sep 2016 02:09 PM |
The scripts enabled, right?
|
|
|
| Report Abuse |
|
|
|
| 02 Sep 2016 02:14 PM |
Whoops, thanks TimeTicks, That would be it. I wasn't using a local script.
Its working wonderfully now.
Thanks abunch to you both for sticken with me. |
|
|
| Report Abuse |
|
|