How do I add usernames on my game leaderboard instead of display names?

How do I add usernames on my game leaderboard instead of display names?

I expect this is probably relatively simple and i’m just being stupid, however I’d like to know if there is a way to show player usernames instead of display names on leaderboards (leaderboards as in the one on your screen that shows the player list, not a physical in-game object - picture below).

My reasoning for this is I am making a training game for my group and I’d like Trainers to be able to check a players points (which are on the leaderboard). As it shows display names, you have to click the person on the leaderboard to be able to see their username, which can be quite annoying and will slow the process of finding out who passed and failed.

Any help that can be provided would be much appreciated, many thanks.

(Screenshot to explain what I mean, arelle is not my username, it is my display name. Instead of showing display names, I would like it to show usernames instead.

image

(EDIT) I apologise if this is in the wrong category too, I’m not entirely sure as it may need a script to be changed, but my actual issue isn’t related to a script directly.

1 Like

You can’t edit the actual leaderboard you’ll have to create your own version.

1 Like

Hi! So I currently have one that I’m using for the points (I should’ve clarified) I’m just not sure how to modify it.

local Leaderstats = Player:FindFirstChild("leaderstats") or Instance.new("Folder", Player)
Leaderstats.Name = "leaderstats"

local PointsValue = Leaderstats:FindFirstChild("Points") or Instance.new("IntValue", Leaderstats)
PointsValue.Name = "Points"

if SavedPoints ~= nil then
	PointsValue.Value = SavedPoints
end

PointsValue.Changed:Connect(function(NewPoints)
end)

I mean, I’m sure you could, but it requires messing with Roblox CoreGui. Instead, you could make a system that adds a player’s name to a GUI depending on their team, then the trainer gets a clone of the GUI with all of the player’s names.

1 Like

There is really no way as @legs_v said. The only way you can do it is to make a custom leaderboard.

If you need to hide the leaderboard once you get a custom one, just do game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiTpye.Playerlist, false)

Found this great tutorial on youtube also. This might help with a custom leaderboard:

2 Likes