Why is there a modulescript in the first place, you should just 1 simple localscript to determine the size of the ui like this for example, although it doesn’t go back to it’s original state once the humanoid dies you could just tweak it around a bit or set the reset on spawn to true.
local player = game:GetService("Players").LocalPlayer
local character = player.Character or game:GetService("Players").LocalPlayer.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
character:WaitForChild("Humanoid"):GetPropertyChangedSignal("Health"):connect(function()
script.Parent:TweenSize(UDim2.new(humanoid.Health / humanoid.MaxHealth, 0,1,0), Enum.EasingDirection.InOut,Enum.EasingStyle.Linear,0.5,true)
script.Parent.Parent.TextLabel.Text = "Health: " .. math.round(humanoid.Health) .. "/" .. humanoid.MaxHealth
end)