Attribute isnt being registered on local script in starter gui

You can write your topic however you want, but you need to answer these questions:

I have an issue where I’m currently trying to create a blood bar with an attribute on the character, but even though the script has no errors, the health bar ui still wont change when the blood attribute has changed. This is a local script under a gui script. Can someone help me figure out the issue to this?

https://gyazo.com/151976357d3021e6588a511308048468

local TweenService = game:GetService("TweenService")

local Player = game.Players.LocalPlayer
local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid")

local HealthBarGui = Player.PlayerGui:WaitForChild("HealthBar") 
local HealthBar = HealthBarGui.Border
local HealthProgress = HealthBar.Bar


local FastTween = TweenInfo.new(0.25, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
local SlowTween = TweenInfo.new(0.4, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)

function UpdateHealthBar()
	TweenService:Create(HealthProgress, FastTween, {Size = UDim2.new(Character:GetAttribute("Blood") / Character:GetAttribute("MaxBlood") , 0, 1, 0)}):Play()
	print("Yo")
end


local function updated()
	local blood = Character:GetAttribute("Blood")
end



Humanoid:GetAttributeChangedSignal("Blood"):Connect(UpdateHealthBar)
Humanoid:GetAttributeChangedSignal("MaxBlood"):Connect(UpdateHealthBar)

UpdateHealthBar()


Was the attribute changed by another localscript? If so, it may not have actually taken effect.

Nope, other script that interacts with the attributes is the server script under startcharacterscript.

which is

local Character = script.Parent

Character:SetAttribute("Blood", 100)
Character:SetAttribute("MaxBlood", 100)

How u setting the attribute on the character but later getting them from the humanoid? If you’re setting the attributes on the character then in your local script use the GetAttributeChangedSignal on the character instead.

What is script.Parent, in other words where exactly is this script located when it’s running or when Character is defined.