Slow down player regeneration

Is there a way to slow down how fast a player regenerates?i know there is, but I don’t know how to slow it down. I see some places either slow it down or simply not regenerate at all. How do I do this?

you dont know how to do this bruh what are you doing

  1. Go to Players in your explorer window
  2. Scroll down in properties until you see “Respawn Time”
  3. Adjust it to a higher / smaller value.

Are you referring to a player’s health regeneration or how fast they respawn?

Why are you being rude to someone who is obviously new or still learning Roblox Studio? This place is meant to help people.

2 Likes

I’m not new. I’ve been doing this for a long time and just got access to the devforum. This isn;t something I know yet, cause I’ve never had to use it until now
Also @JustAGameDeveloper1 didnt even get my question right haha
I mean their health regeneration

I’ll get the tutorial soon.

Okay. Step 1 is to playtest your game-- i mean “experience”

Step 2 is to tab into your character in Explorer.

Step 3 is to check the Health script and change: REGEN STEP.

1 Like

I thought it would have something to do with character scripts. thx for teh help :slight_smile:

No problem, if you have any problems in the future DM me.

Also, please mark my post as solution so people dont get confused.

Fork a copy of the default ‘Health’ script which is copied into each player’s character automatically. Here’s the code.

-- 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

Create a server script named ‘Health’, copy this code into it and place it inside the ‘StarterCharacterScripts’ container (it will override the default ‘Health’ script). To reduce health regeneration you can decrease the value of the ‘REGEN_RATE’ variable, increase the value of the ‘REGEN_STEP’ variable or both.

8 Likes