What is the default heal rate and how can I modify it or disable the default

Not how it works, but okay… Read @Judgy_Oreo’s reply for further info.

This discussion is full of wrong info, so I’ll try to clear up any confusion by explaining as much as possible in one place. Some facts from above are truthful, but some aren’t and it gets mixed up. I want to witre what is true here and this way give a clear idea of what’s wrong.

By default when you play a game Roblox spawns your character inside Workspace:
image

This character contains everything that you add to your own character at the official Roblox avatar menu. Remember, we’re talking about default here.
When you spawn Roblox adds an additional Health script inside your character that looks like this:

-- Gradually regenerates the Humanoid's Health over time.

local REGEN_RATE = 1/100 -- Regenerate this fraction of MaxHealth per second.
local REGEN_STEP = 1 -- Wait this long between each regeneration step.

--------------------------------------------------------------------------------

local Character = script.Parent
local Humanoid = Character:WaitForChild'Humanoid'

--------------------------------------------------------------------------------

while true do
	while Humanoid.Health < Humanoid.MaxHealth do
		local dt = wait(REGEN_STEP)
		local dh = dt*REGEN_RATE*Humanoid.MaxHealth
		Humanoid.Health = math.min(Humanoid.Health + dh, Humanoid.MaxHealth)
	end
	Humanoid.HealthChanged:Wait()
end

Whenever the health of the character changes, this script enters a loop which is active only while the health is less than the maxt health. It waits a certain amount of time so that you aren’t unkillable and then heals you. The healing amount is determined both by the step of the time it waited and the amount of regeneration, so if the wait lagged and instead of one second it passed two seconds when the healing happens it’ll heal you with two seconds worth of HP instead of one second worth of HP.

The cool part is that you can change this script, if you have a script called Health inside this directory:
image

This script will now be copied inside your character instead of the default one. Note that the Health script is deleted on death and copied again on reset, but it will always copy the correct script. This is useful information because sometimes you might want to have external connections which can break. This is how the Health script looks like while playing after I made a new script in the directory said above:

Now all you need in order to have custom healing is to write in this script. You can start by copying the original Healing script source and expanding on it, but remember to change wait() to task.wait() because it is more reliable and less laggy.

1 Like

So… you just wrote what we all wrote? How is everything full of wrong information?

1 Like

I wanted to summarize everything because there are wrong statements throughout the discussion and assuming that the person who made this discussion is a newbie they will be very confused without a summary.