|
| 22 Dec 2013 09:02 PM |
I'm trying to make a leaderboard but it's not working I'm trying to make multiple types of leaderboards like one is a StringValue, one is an IntValue, etc. The problem is, if the leaderstats and the value are different (i.e. if I make the leaderstats an IntValue and the value a StringValue) it won't work. And if I do multiple scripts for the leaderboards, it will only load one. Can anyone make a script that will make multiple values work for the leaderstats? |
|
|
| Report Abuse |
|
|
Madified
|
  |
| Joined: 19 Apr 2011 |
| Total Posts: 5292 |
|
| |
|
|
| 22 Dec 2013 09:04 PM |
print("Cash Stuffs running!")
function onPlayerEntered(newPlayer) wait(.5) local stats = Instance.new("IntValue") stats.Name = "leaderstats"
stats.Parent = newPlayer
local cash = Instance.new("IntValue")
cash.Name = "Points" cash.Value = 0 --This sets the amount of money every player starts with
rank.Name = "Rank" if cg == 1 or cg == 2 or cg == 3 or cg == 4 or cg == 5 or cg == 6 then rank.Value = "[LR] " .. p:GetRoleInGroup(1826) elseif cg == 7 or cg == 9 or cg == 10 then rank.Value = "[MR] " .. p:GetRoleInGroup(1826) elseif cg == 8 then rank.Value = "Diplomat" elseif cg == 11 or cg == 12 or cg == 13 or cg == 14 then rank.Value = "[HR] " .. p:GetRoleInGroup(1826) elseif cg == 255 then rank.Value = "[COM] " .. p:GetRoleInGroup(1826) elseif p.Name == "sneakydomo12" or p.Name == "LawOfDarkness" or p.Name == "sgtmajorkullulu" then rank.Value = "[HICOM] " .. p:GetRoleInGroup(894294) elseif cg == 0 then rank.Value = "Non CG" end
rank.Parent = stats
cash.Parent = stats
stats.Parent = newPlayer
end
game.Players.ChildAdded:connect(onPlayerEntered) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 22 Dec 2013 09:26 PM |
local rank = Instance.new("IntValue") add that |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
|
| 22 Dec 2013 10:41 PM |
| Vampire that didn't work anyways |
|
|
| Report Abuse |
|
|
| |
|
| |
|
Madified
|
  |
| Joined: 19 Apr 2011 |
| Total Posts: 5292 |
|
| |
|
|
| 22 Dec 2013 11:00 PM |
| i'm just bumping until i get an answer |
|
|
| Report Abuse |
|
|
| |
|
Madified
|
  |
| Joined: 19 Apr 2011 |
| Total Posts: 5292 |
|
| |
|
| |
|
Madified
|
  |
| Joined: 19 Apr 2011 |
| Total Posts: 5292 |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 22 Dec 2013 11:08 PM |
| StringValues and IntValues (and NumberValues I believe) should work fine together. |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2013 11:10 PM |
| But they aren't working together though |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
Madified
|
  |
| Joined: 19 Apr 2011 |
| Total Posts: 5292 |
|
| |
|
|
| 22 Dec 2013 11:17 PM |
| Could other types of values work in leaderstats? |
|
|
| Report Abuse |
|
|