local player = game.Players.LocalPlayer --Get Player
repeat wait() until player.Character --Wait for player
local Humanoid = Player.Character:WaitForChild("Humanoid") --Get the humanoid
Humanoid.HealthChanged:Connect(function(health) --Change the healthbar when the health changes
script.Parent.Health.HealthBar.Size.X.Scale = Humanoid.Health*.85 --//healthbar scale size is .85 so I mutliply the health (100) by .85 to make it the propersize so I dont get numbers like .9 (90 health)
script.Parent.Health.Health.Text = Humanoid.Health --Change the displayed number
end)
I don't know why this doesn't work. I've looked at tutorials online, and tried those, but those dont seem to work either. I want the health bar to close in on both sides so it looks more professionally done, but I don't know if I can do that anymore.
