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 » Scripting Helpers
Home Search
 

No output, just a worthless button...?

Previous Thread :: Next Thread 
Noahk is not online. Noahk
Joined: 14 Feb 2008
Total Posts: 1460
03 Jul 2012 05:45 PM
I have this code here, and, well, I have all of the values set up right, but the code does not work and I get no output.
Player=script.Parent.Parent.Parent.Parent.Parent
script.Parent.Text=tostring(script.Parent.ItemName.Value)..": "..tonumber(script.Parent.Cost.Value).." "..tostring(script.Parent.Currency.Value)
script.Parent.MouseButton1Click:connect(function()
if Player:findFirstChild("leaderstats") then
if Player.leaderstats[script.Parent.Currency.Value].Value>=tonumber(script.Parent.Cost.Value) then
if Player.StarterGear:findFirstChild(script.Parent.ItemName.Value) == nil then
Player.leaderstats[script.Parent.Currency.Value].Value=Player.leaderstats[script.Parent.Currency.Value].Value-tonumber(script.Parent.Cost.Value)
game.Lighting:findFirstChild(script.Parent.ItemName.Value):clone().Parent=Player.Backpack
game.Lighting:findFirstChild(script.Parent.ItemName.Value):clone().Parent=Player.StarterGear
end
end
end
end)
Report Abuse
Noahk is not online. Noahk
Joined: 14 Feb 2008
Total Posts: 1460
03 Jul 2012 05:54 PM
Help..?
Report Abuse
AlbinoDerpasaurusRex is not online. AlbinoDerpasaurusRex
Joined: 09 Jun 2012
Total Posts: 248
03 Jul 2012 05:58 PM
[ Content Deleted ]
Report Abuse
Noahk is not online. Noahk
Joined: 14 Feb 2008
Total Posts: 1460
03 Jul 2012 05:59 PM
....I'm sorry, but can I get some help here? D:
Report Abuse
Noahk is not online. Noahk
Joined: 14 Feb 2008
Total Posts: 1460
03 Jul 2012 06:59 PM
Seriously, what is wrong with my code???
Report Abuse
dddylan98 is not online. dddylan98
Joined: 16 Jul 2008
Total Posts: 1497
03 Jul 2012 07:00 PM
I don't know. I can't read it.
Report Abuse
Noahk is not online. Noahk
Joined: 14 Feb 2008
Total Posts: 1460
03 Jul 2012 07:04 PM
ctrl C and V into studio?
You guys have never had this problem before... Heres how I have it now-

Player=script.Parent.Parent.Parent.Parent.Parent

script.Parent.Text=tostring(script.Parent.ItemName.Value)..": "..tonumber(script.Parent.Cost.Value).." "..tostring(script.Parent.Currency.Value)

script.Parent.MouseButton1Click:connect(function()

if Player:findFirstChild("leaderstats") then

if Player.leaderstats.Pts.Value>=tonumber(script.Parent.Cost.Value) then

if Player.StarterGear:findFirstChild(script.Parent.ItemName.Value) == nil then

Player.leaderstats.Pts.Value=Player.leaderstats.Pts.Value-tonumber(script.Parent.Cost.Value)

game.Lighting:findFirstChild(script.Parent.ItemName.Value):clone().Parent=Player.Backpack

game.Lighting:findFirstChild(script.Parent.ItemName.Value):clone().Parent=Player.StarterGear

end

end

end

end)
Report Abuse
Noahk is not online. Noahk
Joined: 14 Feb 2008
Total Posts: 1460
03 Jul 2012 07:19 PM
Is somebody going to help me...?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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