Hello!
I was testing my game and the health Regen was not working? Please Help!
Can you send the script? (all the line)
Can you confirm that StarterCharacterScripts does not contain a replacement “Health” Script?
By inserting a Script called Heath into the character through StarterCharacterScripts, it prevents the normal Health script, that handles regeneration of HP, from being loaded.
If this isn’t the case of the problem, can you check to make sure that the Health script is being loaded into your Character when you play the game?
I can confirm that the there is no other health scripts.
it’s the default health script.
huh,thats odd. It works fine for me
Just send it here [character limit]
-- 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
``
this is odd,are you really really sure you didnt have a health script in SCS or elsewhere
im rly sure I’ve checked millions of times
All I have is a keycde run script, called Run Button
thats very odd.COnsidering its roblox default script
Is this a Roblox problem or not?
i have absolutely no idea (never really mess with it before)
Im testing in another Roblox Studio game.
Its not working on this one either.
Are you changing your players health on the client or server? switch to server mode and change the players health and see if it works.
do I have to change all of my client scripts by firing events fo this to work?
If you plan on changing players health it should always be done on the server. as for your question I need a bit more information. Could you explain how you are currently removing the players health?
I am currently removing the players health when my in-game hunger gets to zero.