Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

?(Custom rank leaderboard) It only shows my rank but not others

Asked by
h0730 -55
5 years ago
Edited 5 years ago

This is the script I've been working on I am sorry if I did anything wrong on this post, it's my first time.

```local a = {[538496882]=true} --etc.

local b = {[100451296]=true, [000000000]=true} --etc.

game:GetService('Players').PlayerAdded:connect(function(player)

local data = Instance.new("Folder")

data.Name = "leaderstats"

data.Parent = player

local rank = Instance.new('StringValue')

rank.Parent = data

rank.Name = 'Rank'

if a[player.UserId] then

rank.Value = game.ServerStorage.RankStorage.Rank1.Value

if b[player.UserId] then

rank.Value = game.ServerStorage.RankStorage.Rank2.Value

end

end

end)

]]```

0
You used a[userID] instead of b[userID]. You should also fix your if statements. There should be an "end" after setting the values rather than using multiple if statements and setting the "end"'s later. PhantomVisual 992 — 5y
0
Alright thanks men h0730 -55 — 5y

Answer this question