I made a sort of boss bar where it displays the boss's current health and max health. Obviously it's supposed to update whenever it's health changes, but it isn't. There are no errors either. Here's my local script:
local healthLabel = script.Parent.Health local boss = workspace:WaitForChild("BossMan") local bossHealth = boss.Humanoid.Health local bossMaxHealth = boss.Humanoid.MaxHealth healthLabel.Text = bossHealth .. "/" .. bossMaxHealth boss.Humanoid.HealthChanged:Connect(function() healthLabel.Text = bossHealth .. "/" .. bossMaxHealth end)
Any help on this matter would be very appreciated.
you can try this
local healthLabel = script.Parent.Health local boss = workspace:WaitForChild("BossMan") local bossHealth = boss.Humanoid.Health local bossMaxHealth = boss.Humanoid.MaxHealth while true do wait() healthLabel.Text = bossHealth .. "/" .. bossMaxHealth end