I need help on how figuring out how to make custom leaderboard

Hi, Developers.

I have a question, most games like: State of Mayflower and Mano County have these custom leaderboards to avoid team clutter. Like if you have have lots of teams and you want to hide some of them if nobody is on the team, how would I do that? If you know please DM me, I’ll pay you to teach me or do it for me.

Here are some pictures to state my point:

image image

2 Likes

image

Heres another:

1 Like

First, you would need to remove the default leaderboard.

game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu, false)
game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)

Next, create your leaderboard design in StarterGui service.
If you don’t know how, this article goes into detail on GUIs.

Now, the complicated part. You have to script it. I’m not going to script it for you completely, since that would take a bit, but I will teach you how.

Create a LocalScript as a child of your ScreenGUI. Inside of it, you will need to bind some keybinds into it. With the default leaderboard, you click Tab key and it closes it. Read this to learn about UserInputService (keybinds service)
If you want yours to be animated, I highly suggest reading this to learn how to tween GUIs, it’s very useful. GuiObject | Roblox Creator Documentation

Here is what your current code should somewhat look like.

game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu, false)
game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)

local UIS = game:GetService("UserInputService")
 
UIS.InputBegan:Connect(function(input, gameProcessed)
	if input.UserInputType == Enum.UserInputType.E then
		script.Parent:FindFirstChild("Frame").Visible = false
	end

Now let’s do the players. You can use ChildAdded event in the Player service to detect a new player.

game:GetService("Players").ChildAdded:Connect(function(playr)
TextLabel.Text = game:GetService("Players").LocalPlayer.Name
end)

Your final code should look something like below. Keep in mind, this is just an example and it shouldn’t look the exact same. It is a rough draft.

game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu, false)
game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)

local UIS = game:GetService("UserInputService")
 
UIS.InputBegan:Connect(function(input, gameProcessed)
	if input.UserInputType == Enum.UserInputType.E then
		script.Parent:FindFirstChild("Frame").Visible = false
	end

game:GetService("Players").ChildAdded:Connect(function(playr)
TextLabel.Text = game:GetService("Players").LocalPlayer.Name
end)

Sorry for bad code formatting, I’m on mobile right now.

5 Likes

Thank you so much, but do you know how to do it? I don’t really i’m horrible at scripts. I dont know where to put anything.

1 Like

Yes, DM me at Shock#8389 I will help you.

1 Like

I don’ have Discord yet, i’m allowed to have it in October. Mind using the forms or roblox chat instead?

1 Like

Yeah add me on roblox, we can use roblox chat. I’ll help you tomorrow since it’s late for me right now.

Thanks it’s late for me, I added you, see ya tomorrow.