How to stop health regen?

Hi there,
I am making a game and I wanted to know who to stop the health regen. I already saw some free models and plugins but it could contain viruses or this kind of stuff. Could you help me find one ?

8 Likes

Hello, good day. There has already a video on how to disable health regen. Please search the DevForum or YouTube for related topics to avoid spam.

Anyways, here’s a video on how to do that:

1 Like

Right now, I just made a quick LocalScript which stops the health regen for all the players in the game. I recommend putting the LocalScript inside StarterPlayerScripts.

local Player = game:GetService("Players").LocalPlayer

game:GetService("RunService").RenderStepped:Connect(function()
	if not workspace:FindFirstChild(Player.Name) then
		return
	end
	if workspace[Player.Name]:FindFirstChild("Health") then
		workspace[Player.Name]:FindFirstChild("Health"):Destroy()
	end
end)
2 Likes

Just copy the health regen script from the character. Then put it in starter character scripts. And put the health regen rate to 0.

14 Likes

Thank you @NilFloat ! I am gonna test it out later today.

I’m pretty sure that’s bad (it could be better) performance-wise.
Something like this would be better

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(char)
        char:WaitForChild("Health"):Destroy()
    end)
end)
2 Likes

Just make it an empty script, as the Health-Regen script has a while true do loop inside of it, which could be avoided if not needed.

It’s not bad for performance. It deletes the health script if character and script exist and that’s all else it just go through some false conditions which are performance low.

I don’t even think the script for the Regen appears every 1 second. It is better if you delete the script when the character is added. Aka, using CharacterAdded. This will reduce the load of the server.

The local scripts don’t use any server performance?

I find the easiest way to remove the health regeneration script is adding a server script into StarterCharacterScripts named Health and in the script you would say script:Destroy() and the health regeneration script will be gone.

Screen Shot 2020-11-11 at 8.46.05 AM

9 Likes

It’s extremely simple, put a script (NOT LOCAL SCRIPT) inside starter character scripts and name it “Health”. This overrides the default regenerating health script.

Thanks to @NilFloat for pointing out my typo I accidently wrote player instead of character.

5 Likes

Inside StarterCharacterScripts would be correct.

Thanks for the correction I didn’t read over what I was posting.

The easiest way to stop regeneration without scripting is by inserting an empty script called “Health” and put it to StarterCharacterScripts.

2 Likes