|
| 22 Dec 2013 10:38 AM |
addtix = {'JimmyChance'}
function findIfAdmin(name) for i,v in pairs(addtix) do if string.lower(name) == string.lower(v) then return true end end return false end
game.Players.PlayerAdded:connect(function(plr) local ldr = Instance.new('IntValue', plr) Ldr.Name = 'leaderstats' local cash = Instance.new('IntValue', ldr) cash.Name = 'Cash' cash.Value = 0 if findIfAdmin(plr.Name) then stats = plr:FindFirstChild('leaderstats') if (stats~=nil) then plrcash = stats:FindFirstChild('Cash') plrcash.Value = plrcash.Value + 300 end end end |
|
|
| Report Abuse |
|
|
domorox17
|
  |
| Joined: 06 Mar 2012 |
| Total Posts: 1710 |
|
|
| 22 Dec 2013 10:39 AM |
| for i,v in ipairs instead of pairs. it is an array. |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2013 10:40 AM |
| Still having problems. I think it's in the second section, actually. |
|
|
| Report Abuse |
|
|
domorox17
|
  |
| Joined: 06 Mar 2012 |
| Total Posts: 1710 |
|
|
| 22 Dec 2013 10:41 AM |
| u need a model called leaderstats first, then the invalue of cash |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2013 10:43 AM |
| What do you mean? I'm using this for a tycoon kit. |
|
|
| Report Abuse |
|
|
domorox17
|
  |
| Joined: 06 Mar 2012 |
| Total Posts: 1710 |
|
|
| 22 Dec 2013 10:46 AM |
| for leaderstats, u need a model called leaderstats to be inserted into the player, then the intvalue of cash inserted into that. |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2013 10:47 AM |
| That is what the second part of the script is supposed to do, unless I did it wrong. |
|
|
| Report Abuse |
|
|
domorox17
|
  |
| Joined: 06 Mar 2012 |
| Total Posts: 1710 |
|
|
| 22 Dec 2013 10:49 AM |
| u inserted an intvalue named leaderstats. make that a model named leaderstats. Instance.new("Model",plr) |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2013 10:53 AM |
No, this method should work. There is no need for me to insert a model.
|
|
|
| Report Abuse |
|
|
domorox17
|
  |
| Joined: 06 Mar 2012 |
| Total Posts: 1710 |
|
|
| 22 Dec 2013 10:53 AM |
| dats how i always insert leaderstats. and it always works. |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2013 11:00 AM |
Is nevermind a real word?
I fixed it, thanks for your assistance. |
|
|
| Report Abuse |
|
|
domorox17
|
  |
| Joined: 06 Mar 2012 |
| Total Posts: 1710 |
|
|
| 22 Dec 2013 11:01 AM |
| never mind is 2 words, and no prob bro |
|
|
| Report Abuse |
|
|