I was trying to make a health bar that shows on top of you, it's working fine until I realized that it doesn't appear when you JOIN the game. It appears right after you die. How do I fix that?
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local bill = game.ReplicatedStorage.BillboardGui:Clone()
bill.Frame.Visible = true
bill.Frame1.Visible = true
bill.TextLabel.Visible = true
bill.Parent = char.Head
bill.TextLabel.Text = plr.Name
char:WaitForChild("Humanoid").Changed:Connect(function()
bill.Frame.Size = UDim2.new(char:WaitForChild("Humanoid").MaxHealth,0,0.3,0)
bill.Frame1.Size = UDim2.new(char:WaitForChild("Humanoid").Health / char:WaitForChild("Humanoid").MaxHealth,0,0.3,0)
end)
end)
end)
Could anyone help me with this?

1 comment
Ok, this did fix the joining, but however, whenever I die, it doesn't appear anymore.