|
| 12 Jan 2014 12:18 PM |
script.Parent.MouseButton1Click:connect(functiontest) Not sure if this is right... |
|
|
| Report Abuse |
|
|
|
| 12 Jan 2014 12:24 PM |
go try it then
#nerdsunited |
|
|
| Report Abuse |
|
|
|
| 12 Jan 2014 12:30 PM |
| I am but the button isn't working so i'm trying to figure out what the problem is... |
|
|
| Report Abuse |
|
|
cycoboy83
|
  |
| Joined: 31 May 2011 |
| Total Posts: 831 |
|
|
| 12 Jan 2014 12:36 PM |
| It's MouseButton1Down, not Click. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 12 Jan 2014 12:38 PM |
Click works.
OP, you are using a TextButton/ImageButton? If you are using a part, you're going to have to create a click detector and use the MouseClick event |
|
|
| Report Abuse |
|
|
|
| 12 Jan 2014 12:40 PM |
local bos = script.Parent.Parent.BorS
function test() if bos.Value == false then bos.Value = true script.Parent.Text = "On" end if bos.Value == true then bos.Value = false script.Parent.Text = "Off" end end
script.Parent.MouseButton1Click:connect(Test)
--Full script --idk whats wrong |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 12 Jan 2014 12:42 PM |
function test() if bos.Value == false then bos.Value = true script.Parent.Text = "On" elseif bos.Value == true then bos.Value = false script.Parent.Text = "Off" end end
script.Parent.MouseButton1Click:connect(Test) |
|
|
| Report Abuse |
|
|
Kingmouli
|
  |
| Joined: 28 Sep 2012 |
| Total Posts: 1292 |
|
|
| 12 Jan 2014 12:42 PM |
Is it in a GUI?
~Kingmouli, King of the Mouli~ |
|
|
| Report Abuse |
|
|
|
| 12 Jan 2014 12:45 PM |
| Now it's saying attempt to call a nil value.. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 12 Jan 2014 12:47 PM |
| I forgot to add the "local bos = script.Parent.Parent.BorS" |
|
|
| Report Abuse |
|
|
|
| 12 Jan 2014 12:49 PM |
| Yes i know. But it's still saying Nil Value... and the value is there and yes its a boolvalue... |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 12 Jan 2014 12:52 PM |
script.Parent.MouseButton1Click:connect(test)
|
|
|
| Report Abuse |
|
|
|
| 12 Jan 2014 12:54 PM |
| Sweet thanks now i can move on with the gui :3 still lots more to do. :p |
|
|
| Report Abuse |
|
|