|
| 21 Sep 2014 02:45 PM |
I've got a leaderboard script in my other game.
The script I'm pointing out on this post is not the leaderboard, but I want it to add on to the leaderboard.
Apparently, this script creates a new leaderstat, but I want it to add on to the current leaderstat created by the leaderboard script. I got this script from somebody else, so any help here? Thanks.
Script:
local gps = game:service'GamePassService' game.Players.PlayerAdded:connect(function(player) local ls = Instance.new("Model", player) ls.Name = "leaderstats" local money = Instance.new("IntValue", ls) money.Name = "Cash" if gps:PlayerHasPass(player, 178650616) then -- replace 000 with ur gamepass ID money.Value = money.Value + 10000 -- amount of money to add if player has pass end end) |
|
|
| Report Abuse |
|
|
|
| 21 Sep 2014 02:49 PM |
| Between Lines 3-5 creates something new, but I want it to add on to the current leaderstat that already has in it, "Cash". |
|
|
| Report Abuse |
|
|
Nyxis
|
  |
| Joined: 15 Nov 2012 |
| Total Posts: 3374 |
|
|
| 21 Sep 2014 02:53 PM |
| that's like the easiest thing to accomplish.. just put the part where it creates the new leaderstat in the other leaderboard script, and parent it to the leaderstats it creates |
|
|
| Report Abuse |
|
|
|
| 21 Sep 2014 03:05 PM |
| I'm still scratching my head... I don't get it. |
|
|
| Report Abuse |
|
|
|
| 21 Sep 2014 03:09 PM |
Wait, does this work out?:
game.Players.PlayerAdded:connect(function(p) p:WaitForChild("leaderstats") p.leaderstats:FindFirstChild("KOs").Changed:connect(function(v) |
|
|
| Report Abuse |
|
|