How do I toggle the display of the Leaderboard in a script?

I don’t want the Leaderboard to be permanently hidden, but I do want it hidden when the game begins and then still respond to the Tab-key or menu choice in the … menu. Any suggestions?

2 Likes

I guess you can get the leaderstats folder of the Player and temporarily store it to a folder in ReplicatedStorage and change the leaderstats folder name to the Player’s Name to remove the leaderboard on the player tab, then when you want it to reshow, parent the folders to the player which has the same name as the folder name and rename the folder back to leaderstats.

@VeriBaesix method should work fine, but in the case that you don’t want player names to be displayed as well, you can use StarterGui:SetCoreGuiEnabled("PlayerList", false)
If I’m not mistaken, this will hide the player list along with the leaderboard stats