I read an article on the Roblox Developer Wiki and also used some scripts found on Google but I still could not find a way to hide the leaderboard. This doesn't work, tried a Script and a LocalScript:
game.StarterGui:SetCoreGuiEnabled("PlayerList", false)
Am I supposed to put the script in a different service? At the moment it is in ServerScriptService.

2 comments
I think that may work if you put it in Starter Gui
Thank you! It worked!