How do i make healthbar with icons in it?

I dont know how to make it, im really bad at scripting, i wanna learn how to script.

if u send me the scripts, ill save it in my notes.

You want to have multiple GUIs, so a black frame as the background, instead of lots of bar Color’s just one red gui, and the icon.

1 Like

how do i add a frames and how to put some colors in it?

Ok I’ll try make script for you and I’ll show you the explorer layout

1 Like

This is what I accomplished

You might need to change some properties
But this is how I did it
image
First you need a screenGui in StarterGui, The blackBackGround will just be a black bar, the redHealth will be a red frame in the black frame (also make sure the redHealth size is {1,0}{1,0} it should fit in the background) and put your icon Id in yourIcon
image
Now you a local script because you can only script GUI’s with local script, put it in redHealth.

Now put this in your local script

local player = game.Players.LocalPlayer 
local humanoid = player.Character:WaitForChild(“Humanoid”) 
local RedHealth = script.Parent 
local yourIcon = script.Parent.Parent.YourIcon 

humanoid.HealthChanged:Connect(function(health) 
RedHealth.Size = UDim2.new(health/100,0,1,0) 
RedHealth.BackgroundColor3 = Color3.fromHSV(0, 1, health/100) 
   yourIcon.Position = UDim2.new(health/100,0,0,0) 
end)```
It should move the health bar.
1 Like

that’s okay you did good, i just need this, thanks!!!

2 Likes