How do you disable automatic healing for all players?

After some seconds players auto-heal. How do i disable that?

2 Likes

Add an empty script in StarterCharacterScripts and name it Health, it will overwrite the default one that gets added which should stop the auto healing.

Quick reference from the docs @BRicey763 provided to show confirmation

And from StarterCharacterScripts

15 Likes

You are right. Here is the offical api docs on it.

2 Likes

Thank you for pointing out that it’s in that documentation too, I’ve updated my post to feature images of what the official documentation provided by Roblox state about it

1 Like

Hello!
Sorry for my English, I use a translator
@ EmbatTheHybrid You’re right, but if do not want to dirty the StarterCharacterScripts folder, then I suggest that you clean the client from “unnecessary scripts” on the server. Sample code:

game.Players.PlayerAdded:Connect(function(Player)
          Player.CharacterAdded:Connect(function(Character)
                   if Character:FindFirstChild('Health') then
                          Character.Health:Destroy()
                   end
          end)
end)
1 Like

There’s really no need to have to make events to do something that is as simple adding an empty script with the same name as the Health script to overwrite it. An empty script isn’t going to impact anything as without overwriting and with overwriting, you’re still going to have a script there, removing them directly on respawn wont really prove to help performance, but rather complicates it

1 Like

Of course, but still, this is one of the possible options :slight_smile:

I think in the humanoid when you run the game there will be scripts and one of those scripts has something to do with autohealing or something?

Sorry for necropost

But when you insert a script into the StarterCharacterScripts called “Health” it disables auto healing, but also disables the effect that makes the screen’s edges red for a split second when getting hurt. I want to remove auto healing but also keep that effect in. How do I do that?

Delete the Health script inside the player’s character.

Since you’re replacing the script you can just reinsert the code that does that.
This post is over a year old, this is beyond necroposting.
Please just make a new post next time if it’s over 4 to 6 months old (personally i’d only reply to 1 month old posts.)

Where is the code tho?

You can copy the default Health script, but remove the portion that regenerates health.

In my game, I still have that effect even though I removed the Health script entirely.

But where do u find the default health script?

You press F5, look inside your character, click on “Health” and Ctrl A + Ctrl C the code.

F5 just lowers my brightness

You’re using a laptop keyboard, aren’t you. Just go to the “test” tab and click “Play”, then look inside your character, find “Health” and right-click it, then click “Copy” and then paste it into the Explorer.

1 Like