Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 30 Jun 2016 03:04 PM |
When all the values are correct nothing happens. local timey = script.Parent.Parent.Parent.Parent.Parent function click() if timey.Fuel.Value > 0 and timey.Energy.Value > 400 and timey.Gear.Value == 2 and timey.Dead.Value == false and timey.Heal.Value == false and timey.Strength > 20 then timey.Demat.Value = true end end script.Parent.ClickDetector.MouseClick:connect(click) |
|
|
| Report Abuse |
|
|
AxonMega
|
  |
| Joined: 29 Aug 2014 |
| Total Posts: 2403 |
|
|
| 30 Jun 2016 03:11 PM |
| Tip: Instead of saying if thisValue == true then --stuff end you can just say if thisValue the --stuff end. It's the same thing. |
|
|
| Report Abuse |
|
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 30 Jun 2016 03:12 PM |
But I don't want tips, I just want to know why it isn't working. Thanks though. |
|
|
| Report Abuse |
|
|
Kurokku
|
  |
| Joined: 01 Aug 2015 |
| Total Posts: 3622 |
|
|
| 30 Jun 2016 03:16 PM |
| Have you ever bothered to check out the output box? |
|
|
| Report Abuse |
|
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 30 Jun 2016 03:16 PM |
| Nope.. I never check the output box.. Like ever.. |
|
|
| Report Abuse |
|
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 30 Jun 2016 03:17 PM |
16:02:35.735 - Workspace.Tardis.Inside.Parts.Console.Demat.Up.Script:3: attempt to compare number with userdata Huh? |
|
|
| Report Abuse |
|
|
Kurokku
|
  |
| Joined: 01 Aug 2015 |
| Total Posts: 3622 |
|
|
| 30 Jun 2016 03:19 PM |
| Is this a surface gui you're working with? |
|
|
| Report Abuse |
|
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 30 Jun 2016 03:20 PM |
| No I'm working with a clickdetector |
|
|
| Report Abuse |
|
|
Kurokku
|
  |
| Joined: 01 Aug 2015 |
| Total Posts: 3622 |
|
| |
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
| |
|
Kurokku
|
  |
| Joined: 01 Aug 2015 |
| Total Posts: 3622 |
|
| |
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
| |
|
Kurokku
|
  |
| Joined: 01 Aug 2015 |
| Total Posts: 3622 |
|
|
| 30 Jun 2016 03:24 PM |
| Wait what are you trying to do... |
|
|
| Report Abuse |
|
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 30 Jun 2016 03:26 PM |
| If all the values are correct and the button is pushed then the demat value will be true. But when all the values are correct nothing happens. |
|
|
| Report Abuse |
|
|
Kurokku
|
  |
| Joined: 01 Aug 2015 |
| Total Posts: 3622 |
|
|
| 30 Jun 2016 03:27 PM |
| Does the value become true? |
|
|
| Report Abuse |
|
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
| |
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 30 Jun 2016 03:28 PM |
| I am such a freaking idiot. I forgot to add .Value to one of the values. |
|
|
| Report Abuse |
|
|
Kurokku
|
  |
| Joined: 01 Aug 2015 |
| Total Posts: 3622 |
|
| |
|