Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
3

Removing Leaderboard from game? [closed]

Asked by 10 years ago

In my game project, there is a GUI I'm making, where it shows your inventory, instead of the regular leaderboards Roblox adds, where it says the title and just shows numbers.

I've seen in some games, where the top right automatic inserted Leaderboard, is removed.

I don't want to use the leaderboard Roblox defaults put in your game.

Is there a way to remove it, that someone could help me learn how to find it, and remove it?

--Thanks in advanced!

Locked by adark and BlueTaslem

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

3 answers

Log in to vote
4
Answered by
adark 5487 Badge of Merit Moderation Voter Community Moderator
10 years ago

What you're looking for is the SetCoreGuiEnabled method of StarterGui.

In a LocalScript,

Game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)

To get this to run, though, you have to put the LocalScript where it will run, such as in the StarterGui itself.

Ad
Log in to vote
1
Answered by 10 years ago

Um, I am not sure I understand your question completely but this might help.

Whenever you want to disable one of Roblox's Core GUIs, you can use some simple bits of code in a local script.

Here's how it works:

In the code, SetCoreGuiEnabledis a method we use in local scripts to enable/disable the visibility of certain CoreGUI elements. The Core GUI itself is actually part of the Starter GUI. Once we have SetCoreGuiEnabled, then we have to define what we are enabling/disabling. To do this, we must set a specific Enum so it knows what we want. This Enum is represented by the name CoreGuiType. Here are all the names of the available Enums for this.

  • Enum.CoreGuiType.PlayerList
  • Enum.CoreGuiType.Health
  • Enum.CoreGuiType.Backpack
  • Enum.CoreGuiType.Chat
  • Enum.CoreGuiType.All

To get the leaderboard, we will use Enum.CoreGuiType.PlayerList.

Now we must decide whether it will be visible or not. To disable it's visibility, we will set it to false.

So, Here is what it should look like:

local StarterGui = Game:GetService('StarterGui')

StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)

On an iOS device, there are two other Core GUI's involved. To get rid of these, use this:

local UIS = Game:GetService('UserInputService')
UIS.ModalEnabled = true --If you don't want them shown on mobile, make this false.

Hope this helped, and if you need an explanation on something comment below! :)

Log in to vote
-1
Answered by 9 years ago

@adark the script you gave us works thanks a lot.