|
| 15 Jan 2014 10:24 AM |
buy = script.Parent.Parent.Parent.Parent.leaderstats.KOs function onClicked() if buy >= 0 then item = game.Lighting.Sword:Clone() item.Parent = script.Parent.Parent.Parent.Parent.Backpack end end script.Parent.MouseButton1Click:connect(onClicked)
Output "leaderstats" is not a valid member of Player.
I tested it in studio, and I saw that leaderstats WAS a valid member.. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 15 Jan 2014 11:10 AM |
It takes a while to be made.
Put :WaitForChild("leaderstats") instead. |
|
|
| Report Abuse |
|
|
|
| 15 Jan 2014 12:56 PM |
Got it working. I also forgot to put
KOs.Value
Thx tho |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 15 Jan 2014 02:15 PM |
Ooh you dont wanna do that.
If you are gonna do '.Value' at the end, move the buy variable to after the function. |
|
|
| Report Abuse |
|
|