|
| 08 Aug 2016 11:34 PM |
LocaScript: local plr = game.Players.LocalPlayer local value = tonumber(script.Parent.Parent.Amount.Text)
script.Parent.MouseButton1Down:connect(function() if plr.Bank.Value <= value then plr.Bank.Value = plr.Bank.Value - value plr.Cash.Value = plr.Cash.Value + value end end)
Output: Players.AlertedDynamite.PlayerGui.Bank.Frame.Frame.TextButton.LocalScript:5: attempt to compare number with nil 00:32:03.993 - Stack Begin 00:32:03.995 - Script 'Players.AlertedDynamite.PlayerGui.Bank.Frame.Frame.TextButton.LocalScript', Line 5 00:32:03.996 - Stack End
Code is ummmm? Classified. |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2016 11:40 PM |
there's something wrong with
plr.Bank.Value
or "value"
one of them is nil
i'm guessing "value"
Formerly xXTheRobotXx, add 13,349 posts |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2016 11:51 PM |
No.
Code is ummmm? Classified. |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2016 11:54 PM |
| No? The guy above you is correct and is trying to help you |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2016 11:56 PM |
Im not seeing what is nil o.O
Code is ummmm? Classified. |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2016 11:58 PM |
plr.Bank.Value is nil or value is nil
nil means it does not exist or it is nothing
try using WaitForChild() or making sure you are using the right things |
|
|
| Report Abuse |
|
|
|
| 09 Aug 2016 12:07 AM |
Still dont work
Code is ummmm? Classified. |
|
|
| Report Abuse |
|
|
Eslerp
|
  |
| Joined: 07 May 2016 |
| Total Posts: 205 |
|
|
| 09 Aug 2016 12:35 AM |
| Does Amount.Text equal anything? If Amount does not have any text, it will return nil. And from what the error says, I'm pretty sure 'value' is the one that equals nil. To fix that, your going to have to put text into Amount. It looks like your using a bank, so I'd suggest putting a 0 as your Text. |
|
|
| Report Abuse |
|
|