First of all i want to point out that using "!= 120" (Which means "Anything that is not exactly 120") is a problem if the life regeneration has no max ammount scripted. (I.e. the var is not
Because you could be regenerating PAST 120, and for example, 150 is in fact "!= 120", which would mean you keep regenerating forever.
Second of all, im not sure how the damage is handled, but this code is using "Health" and not "Current health" maybe that's the problem?
Finally, you'll find the ways that work best for you, but for something like this i like to use two timers.
One timer is for the time it takes before life starts to regenerate, and another timer for the regeneration speed.
It'd be something like this:
if current_health < 120: #If health is less than 120...
health_regen.start() #Starts the healing cooldown
func _on_health_regen_timeout(): #Once the cooldown is finished...
$Regeneration.start #It starts the actual regeneration.
func _on_Regeneration_timeout(): #Every time the regeneration completes a cycle...
current_health += 1
if current_health == health:
(Important: "Health_regen" is a one-shot timer, "regeneration" is not.)
You should also add a...
current_health = clamped(current_health, 0, 120)
somewhere in the process code to prevent health from going below min or above max values