Every healthbar script i try works fine for the most part, but when i die it doesnt go back to full size when i respawn. It's gotten to the point where im just looking at scripts online and they all still do that
this is the current script im using
-- ScriptGuider
-- Basic custom health bar program from my YouTube video
-- Video: https://www.youtube.com/watch?v=opZtUhwDWE8
wait() -- ROBLOX made me do this.
local Player = game:GetService'Players'.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:wait()
local Human = Character:WaitForChild("Humanoid")
local HealthFrame = script.Parent
Human.HealthChanged:connect(function(Health)
HealthFrame.Size = UDim2.new(Health/Human.MaxHealth,0,1,0)
end)

2 comments
although i am new at scripting, maybe you should try to reset the health bar when the humanoid is dead, it could go into StarterCharacterScripts, although im not sure if it will work
believe it or not this worked