Humanoid.Health

local Health = character.Humanoid.Health
print(Health)
if Health > 0 then
Health = Health + 50
end

So, i don’t know, this should work but the health just won’t change

2 Likes

The script is modifying the local Health variable within the script but not the humanoid property. Solve it by using dot syntax to indicate to Luau to modify the humanoid property.

local humanoid = character.Humanoid
local Health = humanoid.Health
print(Health)
if Health > 0 then
humanoid.Health = humanoid.Health + 50
--or do
--humanoid.Health += 50
end
3 Likes