Hi, so when I asked a server leaderboard, I mean a real custom leaderboard like in phantom forces where it tells you your leaderstats. I also want the person with the most stats to be on top, but for some reason, when I add a player to the leaderboard it does not show to the other players.
local Players = game:GetService("Players")
local Template = game:GetService("ReplicatedStorage").Template
Players.PlayerAdded:Connect(function(Plr)
local newTemplate = Template:Clone()
newTemplate.Name = Plr.Name
for i,v in pairs(Players:GetChildren()) do
if v:FindFirstChild("PlayerGui") then
if v.PlayerGui:WaitForChild("Leaderboard") then
if v.PlayerGui.Leaderboard:WaitForChild("Holder") then
if v.PlayerGui.Leaderboard.Holder:WaitForChild("Platform") then
newTemplate.Parent = v.PlayerGui.Leaderboard.Holder.Platform
end
end
end
end
end
newTemplate.PName.Text = Plr.Name
end)
Players.PlayerRemoving:Connect(function(Plr)
local server = Players:GetChildren()
for i,v in pairs(Players:GetChildren()) do
if v:WaitForChild("PlayerGui") then
if v.PlayerGui:WaitForChild("Leaderboard") then
if v.PlayerGui.Leaderboard:WaitForChild("Holder") then
if v.PlayerGui.Leaderboard.Holder:WaitForChild("Platform") then
for _,e in pairs(v.PlayerGui.Leaderboard.Holder.Platform:GetChildren()) do
if e.Name == Plr.Name then
e:Destroy()
end
end
end
end
end
end
end
end)

4 comments
Please post your code or something like that.
i did
What you're asking for requires GUI knowledge. Though there are some UI libraries than can help you with this. ROACT can help with this as it is used in Whatever Floats Your Boat (it's the only game I know that uses this) and it seems among the most popular library. Give that a try.
I can't really help you... I need the game file but you probably don't want people to see it so I can't help you.