generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Help

Previous Thread :: Next Thread 
AlertedDynamite is not online. AlertedDynamite
Joined: 12 Jun 2015
Total Posts: 667
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
Lord_Narwhal is not online. Lord_Narwhal
Joined: 05 May 2012
Total Posts: 3242
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
AlertedDynamite is not online. AlertedDynamite
Joined: 12 Jun 2015
Total Posts: 667
08 Aug 2016 11:51 PM
No.


Code is ummmm? Classified.
Report Abuse
jordan0810 is not online. jordan0810
Joined: 03 Jun 2012
Total Posts: 846
08 Aug 2016 11:54 PM
No? The guy above you is correct and is trying to help you
Report Abuse
AlertedDynamite is not online. AlertedDynamite
Joined: 12 Jun 2015
Total Posts: 667
08 Aug 2016 11:56 PM
Im not seeing what is nil o.O


Code is ummmm? Classified.
Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
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
AlertedDynamite is not online. AlertedDynamite
Joined: 12 Jun 2015
Total Posts: 667
09 Aug 2016 12:07 AM
Still dont work


Code is ummmm? Classified.
Report Abuse
Eslerp is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image