Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

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

Asked by
h0730 0
10 days ago
Edited 10 days 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 338 — 9d

Answer this question