the stages of how its happening:
its a Titan Zombie which meanAbos
thats why i only had 1 hbar
- server clone The zombie
local zmb = game.Serverstorage.Zombie:clone()
zmb.parent = workspace
- Zombie HBar form as Screengui
retrieve health and maxhealth data from the New cloned Zombie to workspace.
local Character = game.Workspace.Zombie:WaitForChild("R6")
local hum = Character:WaitForChild("Humanoid") -- player humanoid
HpText.Text = string.format("Health: %s/%s", hum.Health, hum.MaxHealth) -- The hp TextLabel
hum.HealthChanged:Connect(function() -- function whenever player hp is changed
local hp, maxhp = hum.Health, hum.MaxHealth
if hp < 0 then
hp = 0
end
HpText.Text = string.format("Health: %s/%s", math.round(hp), math.round(maxhp)) -- The hp TextLabel
Problems:
when Player damage zombie as much as 50/100
and Server :destroy all zombies, when time runs out
the healthbar does not focus on the maxhealth and health (100/100) of the new zombieBos titan,
instead it focuses on the old zombie health data (50/100).
how do i make the titan zombie healthbar focus on the new cloned Zombie server?