Can I access core leaderboard ui?

Hey yall, so I’ve been making a system that uses Teams. This system allows you to choose a color3 and icon for your team (like a clan system), and I wanted the icon and specific color (since teams use brickcolor as opposed to color3) to display on roblox’s built-in leaderboard ui. I’ve yet to find a way to edit the core leaderboard ui, since afaik, there isn’t a direct script in playergui that handles the leaderboard. I understand that a custom leaderboard might be the best direction to go for this system, but if I could somehow alter the default leaderboard, that’d make it significantly easier on me.

any ideas?

You would have to mess with the core scripts if it’s even possible. So it may be better in the long run to just go with something like this … gl

-- Put this LocalScript in StarterPlayer > StarterPlayerScripts

local player = game.Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local Teams = game:GetService("Teams")

-- Create a custom leaderboard frame
local leaderboardFrame = Instance.new("Frame")
leaderboardFrame.Size = UDim2.new(0, 200, 0, 300)
leaderboardFrame.Position = UDim2.new(0, 10, 0, 10)
leaderboardFrame.BackgroundColor3 = Color3.new(0, 0, 0)
leaderboardFrame.Parent = playerGui

-- Function to update leaderboard
local function updateLeaderboard()
    -- Clear existing entries
    for _, child in pairs(leaderboardFrame:GetChildren()) do
        if child:IsA("TextLabel") then
            child:Destroy()
        end
    end

    -- Display team information
    for _, team in pairs(Teams:GetTeams()) do
        local teamEntry = Instance.new("TextLabel")
        teamEntry.Size = UDim2.new(1, 0, 0, 30)
        teamEntry.BackgroundColor3 = team.TeamColor.Color
        teamEntry.Text = team.Name
        teamEntry.Parent = leaderboardFrame
    end
end

-- Update leaderboard when player joins
player.CharacterAdded:Connect(updateLeaderboard)

1 Like

I know it’ll be easier to use a custom leaderboard, but I’d honestly wanna try messing with the core ui just for fun lol. I do appreciate the code suggestion though :]

It’s possible to extract the source code of the built-in leaderboard from Roblox Studio’s files (RobloxStudioPath\ExtraContent\scripts\CoreScripts\Modules\PlayerList). So if you know about Roact, CorePackages, UIBlox, etc, you could probably reverse engineer it to work without the CoreScript thread identity (Work with Local Scripts) and make all the changes you want. I’m not saying this would be easy, though.

1 Like

yeah in that case, i’ll probably just make my own leaderboard. My only issue is that roblox has a navbar that lets you access leaderboard (its on the top left I believe), so how would I bind that button to my custom leaderboard? is there some sort of leaderboard toggle event that I could hook to my custom lb?

Reverse engineer the topbar as well :man_shrugging:.

1 Like

Does this imply that roblox doesnt have support for leaderboard toggle detection? I need as much info for this as I can get lol

Yes. if you have more question can you send me then in dm’s so I don’t have to try and bypass the minimum character post requirement.

1 Like

yeah for sure, do you have discord? My username’s axyndey
I really appreciate the help