Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you temporarily stop regen Health when damaged?

all answers are appreciated

1 answer

✓ Accepted answer

I looked at your question and got interested myself and I made the code for that. here it is

local Character = script.Parent
local Humanoid = Character:WaitForChild("Humanoid")
local CurrentHealth = Humanoid.Health
local HealthScript = Character:FindFirstChild("Health")

Humanoid.HealthChanged:Connect(function(health)
	if CurrentHealth > health then
		HealthScript.Disabled = true
		wait(3)	
		HealthScript.Disabled = false
	end
CurrentHealth = health
end)

Put it in StarterCharacterScripts and you done . now the player needs to wait 3 seconds before healing appears

2 comments

0

Thank you!

0

no problem :)

This discussion is preserved as it was. New answers, comments, and votes are closed.