that’s super easy
just use +=
local tool = script.Parent
local health = 200
local function onActiv()
local hum = script.Parent.Parent.Humanoid
hum.MaxHealth += health
hum.Health += health
end
tool.Activated:Connect(onActiv)
that’s super easy
just use +=
local tool = script.Parent
local health = 200
local function onActiv()
local hum = script.Parent.Parent.Humanoid
hum.MaxHealth += health
hum.Health += health
end
tool.Activated:Connect(onActiv)
Ye, @D0RYU said everything right. If you need to decrease your health. Make same function witch can be triggered on unequipped event and set heath to 100 or your default value.
alright thanks for both of your help.
to decrease health use -=
there is also
..=, /=, %=, and *=
please tell me if I missed any