Is it possible to split Health into variables?

I believe your issue was almost entirely because you used the wrong image ids initially. I rewrote the script using various parts from other replies on this topic (most I’m assuming would have worked if the correct ids were used, they were just using what you gave them). It should work now as I have tested it in Studio myself.

local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")

-- All your ImageLabel locations
local GuiParent = script.Parent.Health.NoobHealthGUI

local hp1 = GuiParent.HP1
local hp2 = GuiParent.HP2
local hp3 = GuiParent.HP3


local AssetPrefix = "rbxassetid://"

-- Dictionary with numbers as keys for readability
local DIGITS = {
	["0"] = "9935112414",
	["1"] = "9935111915",
	["2"] = "9935107197",
	["3"] = "9935106743",
	["4"] = "9935106123",
	["5"] = "9935102514",
	["6"] = "9935101225",
	["7"] = "9935100674",
	["8"] = "9935100121",
	["9"] = "9935099243",
}

local function UpdateHealthGui(health)
	local h1, h2, h3 = string.format("%03d", health):match("(%d)(%d?)(%d?)")
	hp1.Image = AssetPrefix..DIGITS[h1]
	hp2.Image = AssetPrefix..DIGITS[h2]
	hp3.Image = AssetPrefix..DIGITS[h3]
end

UpdateHealthGui(humanoid.Health)
humanoid.HealthChanged:Connect(UpdateHealthGui)

Please ensure the Gui Locations I used are correct and in line with yours before using.

2 Likes

Oh awesome TY so much it works! :smiley: