Problem
I am in the process of making a game and as I was testing out a health bar, I have found a problem in where the health bar wont go down when it takes damage.
function base.update_health(damage)
if damage then
base.present_health -= damage
end
local health_display = game.StarterGui.base_health
local percent = base.present_health / base.max_health
health_display.present_health.Size = UDim2.new(percent, 0, 0.05, 0)
health_display.health_display.Text = base.present_health.. "/".. base.max_health
end
No it’s not. Its a value I set in a script and when a mob hits it a part, the health of that mob gets subtracted from the value I put in… like a tds healthbar
Add a frame that same settings/ properties as present_health then change the size of present_health to {1, 0},{1, 0} and make the position to {0, 0},{0, 0} then parent the present_health to the frame you added