|
| 28 Jul 2014 09:10 AM |
LeaderstatType = script.Parent.Parent.LeaderstatType
if player.leaderstats.LeaderstatType.Value >= amountpay then print("Hello World") end
error LeaderstatType is not a valid member of IntValue
this error means it did not check the varible since the intvalue is refering to the leaderstat |
|
|
| Report Abuse |
|
|
|
| 28 Jul 2014 09:11 AM |
| The code at the top is unused, should it be there? |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 28 Jul 2014 09:12 AM |
LeaderstatType = script.Parent.Parent.LeaderstatType
if player.leaderstat:findFirstChild(LeaderstatType).Value >= amountpay then print("Hello World") end
? |
|
|
| Report Abuse |
|
|
|
| 28 Jul 2014 09:14 AM |
the code at the top is referring to a stringvalue so it can be easily config able
I already made the amountpay do the same thing with a num value |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 28 Jul 2014 09:15 AM |
So this:
LeaderstatType = script.Parent.Parent.LeaderstatType
if player.leaderstat:findFirstChild(LeaderstatType.Value).Value >= amountpay then print("Hello World") end
?
|
|
|
| Report Abuse |
|
|
|
| 28 Jul 2014 09:19 AM |
| attempt to index a nil value |
|
|
| Report Abuse |
|
|
|
| 28 Jul 2014 09:26 AM |
| leaderstats[LeaderstatType.Value] |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
| |
|