print("here")
local Mob = script.Parent
local Hum = Mob:WaitForChild("Humanoid")
local CurrentHealth = Hum.Health
print(Hum:GetFullName())
local function HealthTweening(Health)
print("healthchanged")
if Health <= 0 then
CurrentHealth = 0
else
CurrentHealth = Health
end
Mob:WaitForChild("HumanoidRootPart"):WaitForChild("Health"):WaitForChild("HealthUI"):WaitForChild("HealthStrip"):TweenSize(UDim2.new(CurrentHealth/Hum.MaxHealth, 0, 1, 0), "Out", Enum.EasingStyle.Linear, 0.1)
--^^Put in client - Mobs have tag, look for tags and this
end
Hum.HealthChanged:Connect(HealthTweening)
For some reason, this script isn’t outputing anything. This script is in a model which is cloned in the beginning of the game with its parent as workspace.