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
|
  |
| Joined: 14 Feb 2008 |
| Total Posts: 1460 |
|
| |
|
| |
|
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
|
  |
| Joined: 14 Feb 2008 |
| Total Posts: 1460 |
|
|
| 03 Jul 2012 06:59 PM |
| Seriously, what is wrong with my code??? |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| Joined: 14 Feb 2008 |
| Total Posts: 1460 |
|
|
| 03 Jul 2012 07:19 PM |
| Is somebody going to help me...? |
|
|
| Report Abuse |
|
|