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

Hiding Health, Backpack and Player List?

Asked by 10 years ago

I need tons of help on hiding my Health, Backpack and Player List on my game. Please I need tons of help!

5 answers

Log in to vote
4
Answered by
Lupine 60
10 years ago

What you're looking for is the method SetCoreGuiEnabled. It's a member of StarterGui.

To hide the Health bar, backpack, and player list, you're going to need to do this:

game.StarterGui:SetCoreGuiEnabled(4, false)
game.StarterGui:SetCoreGuiEnabled(3, true)

What that does is set all the core gui elements activation to 'off', then turns the chat coregui element back 'on' (because you wanted that one)

Let me know if you have any further questions!

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

You're looking for the SetCoreGuiEnabled method of StarterGui.

Keep in mind, this has to be in a LocalScript to work, so put this code inside a LocalScript in StarterGui:

Game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
Game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)
Log in to vote
0
Answered by 10 years ago

In localscript in StarterGui

game:GetService("StarterGui"):SetCoreGuiEnabled("Health", false)
Log in to vote
-1
Answered by 10 years ago

Hiding this only takes one function, SetCoreGuiEnabled. However, keep in mind that you must use it with a LocalScript.

Now then, here's a quick rundown. The first argument specifies that CoreGui you want to remove. The options are PlayerList, Health, Backpack, Chat and All. These are enums, but can expressed as strings (as shown bellow). The second argument determines if the GUI should be shown or hidden. In this case we'd want to hide it.

game.StarterGui:SetCoreGuiEnabled("All", false) -- Setting them all off is quicker than doing it one-by-one
game.StarterGui:SetCoreGuiEnabled("Chat", true) -- Now we make chat visible again
0
So if I wanna do 1 at a time I have to do EmperorF 0 — 10y
0
game.StarterGui:SetCoreGuiEnabled("PlayerList", true) | game.StarterGui:SetCoreGuiEnabled("Health", true) | game.StarterGui:SetCoreGuiEnabled("Backpack", true) ALL in one scritpt? EmperorF 0 — 10y
0
Well, you want to turn them off. So just replace your trues with falses and yeah, you're all good! DaMrNelson 130 — 10y
Log in to vote
-6
Answered by 10 years ago

Simple, this can be done through a local script with

game:GetService("StarterGui"):SetCoreGuiEnabled("All", On)

This is used to make certain CoreGuis be hidden/Shown,

On is the true/false value, setting it to false will make the CoreGui be hidden.

The numbers/names for CoreGuis can be found here:

http://wiki.roblox.com/index.php?title=CoreGuiType

Answer this question