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

How do i hide the health bar?

Asked by 10 years ago

I dont no how to hide health bar anyone help?

3 answers

Log in to vote
0
Answered by 10 years ago
function onPlayerEntered(newPlayer) 
    wait(.5) 
newPlayer.PlayerGui.HealthBar:remove()
end 
game.Players.ChildAdded:connect(onPlayerEntered) 

EDIT: Roblox Does not have a Health Gui in PlayerGui anymore. They did some kind of wacky new way to do the health gui. DARN THE ROBLOX UPDATES.

0
Ikr demonducky5 0 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

Please don't hate me for typing this kind of script, because I'm trying to figure this out myself;

game:service("StarterGui"):SetCoreGuiEnabled("HealthGUI",false) --This may not work
Log in to vote
-2
Answered by
Tecara 0
10 years ago

The health bar gui or the health bar above someones head? If it is above someones head then set the reals head transparency to 1, then clone the head (not transparent) and insert a weld into the clone that welds it to the real head.

For example:

realHead = game.Workspace:findFirstChild("YourModelHere"):findFirstChild("Head")
fakeHead = realHead:Clone()
fakeHead.Parent = Workspace
realHead.Transparency = 1
weld = Instance.new("Weld",realHead)
weld.Part1 = realHead
weld.Part0 = fakeHead

A little different if it's a player.

local character = Game.Workspace.CharacterHere --just replace CharacterHere with your character name.

local head = character.Head
local cHead = head:Clone()
head.Transparency = 1
cHead.Name = "Part"
cHead.Parent = character

local weld = Instance.new("Weld")
weld.Part0 = head
weld.Part1 = cHead
weld.Parent = head

Answer this question