Toggle Roblox's Leaderboard by Default

I want to toggle the roblox’s leaderboard hidden by default when the player spawns, like how players are able to toggle it by pressing “tab”

d88227db0f3eb97ecb0e00d7e029d330

There’s the solution of hiding the CoreGui by simply disabling it and enabling it, but I don’t want to disable it I just want the leaderboard to be toggled hidden by default.

4 Likes

I don’t get what you want here. You want to hide it by not using SetCoreGuiEnabled?

He wants it to be hidden by default, instead of showing. You could still press tab to open it, not using SetCoreGuiEnabled

4 Likes

I want the same thing and after much Googling I still haven’t found an answer. So I thought I would bump this topic and see if anyone has a solution.

Now, it seems exactly what you want is not possible.

How about I offer these solution instead:

  1. Have a custom button for hiding/showing the leaderboard for mobile/pc, and add the tab keybind for pc.
    – or –
  2. Create your own/Use another leaderboard system.
1 Like

Hello! Unfortunately, I don’t believe this to be possible. However, there is a work around. While it isn’t perfect, you can put the following code in StarterPlayerScripts:

local sgui = game:GetService("StarterGui")
local UserInputService = game:GetService("UserInputService")

sgui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false) -- completely disables playerlist when the player first joins

UserInputService.InputBegan:Connect(function(input, gpe)
	if gpe then
		return
	end
	if input.KeyCode == Enum.KeyCode.Tab then -- detects if player presses tab
		sgui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, true) -- re-enables playerlist
	end
end)

This kind of works, but there are definitely some issues with it. Players on tablet will have no way of re-enabling the playerlist, and computer players can’t re-enable it in the three dots menu in the top right corner. You probably could make a custom GUI to allow tablet players to re-enable it, but that is a little bit clunky. If possible, the best solution would probably be to make a custom leaderboard instead. This does work if you can’t or don’t want to make a custom leaderboard if you are okay with it’s drawbacks!

Edit: I just remembered that Roblox added leaderboards to phones a little while ago. It would probably be good to check if the player is on phone and enable the leaderboard if they are. The phone leaderboard is opened up in the three dots menu so it’s basically already hidden by default!

Hope this helps! :wink:

2 Likes

You’ve done a very good job summarizing the problem, possible solutions, and the issues with each solution. I just wish there was a simple solution to a simple problem. Especially since, as you stated, the cell phone interface is already hidden by default. Thank you for your help.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.