352ynnhoj
|
  |
| Joined: 21 Sep 2010 |
| Total Posts: 1054 |
|
|
| 10 Jul 2012 02:01 PM |
using the line: script.Parent.ClickDetect.MouseClick:connect(onClicked) It gives no errors yet it does nothing, I have a print("Work") below the function but it does not print so its getting stuck at ClickDetect. Anyone know why? |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2012 02:02 PM |
script.Parent.ClickDetector.MouseClick:connect(onClicked)
> † KMXD †
|
|
|
| Report Abuse |
|
|
WhiteRain
|
  |
| Joined: 24 Apr 2010 |
| Total Posts: 2723 |
|
|
| 10 Jul 2012 02:02 PM |
| Make sure you end) it correctly and that there is a ClickDetector inside the brick being clicked. |
|
|
| Report Abuse |
|
|
352ynnhoj
|
  |
| Joined: 21 Sep 2010 |
| Total Posts: 1054 |
|
|
| 10 Jul 2012 02:04 PM |
| The name is correct, i changed the ClickDetector name to ClickDetect. There is a ClickDetector in there otherwise output would show an error. What do you mean end it correctly? |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2012 02:05 PM |
@White
I think it's the fact that he put "ClickDetect".
> † KMXD † |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2012 02:05 PM |
@352
Please post more code then.
> † KMXD † |
|
|
| Report Abuse |
|
|
WhiteRain
|
  |
| Joined: 24 Apr 2010 |
| Total Posts: 2723 |
|
|
| 10 Jul 2012 02:05 PM |
| Is that your connection line or are you using an anonymous function? |
|
|
| Report Abuse |
|
|
352ynnhoj
|
  |
| Joined: 21 Sep 2010 |
| Total Posts: 1054 |
|
|
| 10 Jul 2012 02:06 PM |
function onClicked() print("Start") if script.Parent.Parent.Parent.Active.Value == false then if script.Parent.Parent.Parent.State.Value == false then script.Parent.Parent.Parent.State.Value = true end if script.Parent.Parent.Parent.State.Value == true then script.Parent.Parent.Parent.State.Value = false end end end
script.Parent.ClickDetect.MouseClick:connect(onClicked) |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2012 02:06 PM |
@White
It's not an anonymous function...
> † KMXD † |
|
|
| Report Abuse |
|
|
352ynnhoj
|
  |
| Joined: 21 Sep 2010 |
| Total Posts: 1054 |
|
|
| 10 Jul 2012 02:06 PM |
| Everything is in place so dont ask that. |
|
|
| Report Abuse |
|
|
WhiteRain
|
  |
| Joined: 24 Apr 2010 |
| Total Posts: 2723 |
|
|
| 10 Jul 2012 02:08 PM |
| Well I thought that he as trying to implement an anonymous function as he never stated if it was his connection line or what. |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2012 02:08 PM |
function onClicked() print("Start") if not script.Parent.Parent.Parent.Active.Value if not script.Parent.Parent.Parent.State.Value then script.Parent.Parent.Parent.State.Value = true elseif script.Parent.Parent.Parent.State.Value then script.Parent.Parent.Parent.State.Value = false end end end script.Parent.ClickDetect.MouseClick:connect(onClicked)
> † KMXD †
|
|
|
| Report Abuse |
|
|
|
| 10 Jul 2012 02:09 PM |
oops
function onClicked() print("Start") if not script.Parent.Parent.Parent.Active.Value then if not script.Parent.Parent.Parent.State.Value then script.Parent.Parent.Parent.State.Value = true elseif script.Parent.Parent.Parent.State.Value then script.Parent.Parent.Parent.State.Value = false end end end script.Parent.ClickDetect.MouseClick:connect(onClicked)
> † KMXD † |
|
|
| Report Abuse |
|
|
352ynnhoj
|
  |
| Joined: 21 Sep 2010 |
| Total Posts: 1054 |
|
|
| 10 Jul 2012 02:12 PM |
neither work, i tried this: function onClicked() print("Start") if not script.Parent.Parent.Parent.Active.Value == true then print("Dos") if not script.Parent.Parent.Parent.State.Value == true then print("RO") script.Parent.Parent.Parent.State.Value = true end if not script.Parent.Parent.Parent.State.Value == false then script.Parent.Parent.Parent.State.Value = false end end end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
then i got to print("RO") then it didnt work. |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2012 02:16 PM |
function onClicked() print("Start") if not script.Parent.Parent.Parent.Active.Value == true then print("Dos") if not script.Parent.Parent.Parent.State.Value == true then print("RO") script.Parent.Parent.Parent.State.Value = true elseif not script.Parent.Parent.Parent.State.Value == false then script.Parent.Parent.Parent.State.Value = false end end end script.Parent.ClickDetector.MouseClick:connect(onClicked)
> † KMXD † |
|
|
| Report Abuse |
|
|
352ynnhoj
|
  |
| Joined: 21 Sep 2010 |
| Total Posts: 1054 |
|
|
| 10 Jul 2012 02:31 PM |
| That semi-worked. did alteration to it. |
|
|
| Report Abuse |
|
|