Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is there a way to disable Roblox's death script for players?

Hi, I'm working on a game that I want to be able to revive other players when they get down to 0 health, but when that happens, Roblox just makes them fall apart and respawn. I've tried looking up how to disable it, and can't find anything. Tried finding it, but is it in the system, where you can 't disable it? Or is there a way you can override it?

3 comments

0

Make their health 1 instead?

0

Or 0.01 lol

0

just dont kill them, but immobilize them

3 answers

✓ Accepted answer

disable death state and do something like

game:GetService("RunService").Stepped:Connect(function()
	humanoid.Health = math.max(humanoid.Health,1)
end)

Make their health 1 or close to 0 and then remove their health regeneration script then uh change their speed to 0 and do whatever you want.

6 comments

0

nice anwser

0

Thanks, I never though of that.

0

The game has zombies in it that attack you, and I tried doing it so when your health goes to zero it goes to 0.1 but I still keep dieing.

0

try placing a forcefield inside the character humanoidrootpart. A lot of other video games use this method give players a chance if their health are to low. Uncharted for example.

0

Ermmmm, add a script where it's on a loop and it will break once it the player health reaches 0.1 When it does, just made the HealthViewDistance to none and then make their health 100 so the players won't be able to see the green bar on the top right.

0

Just add another ask and I'll help you with that.

I'd try finding the damage script itself. If its damage value is equal to or exceeds the current health property of humanoid belonging to said player then fire a custom event that takes care of the revive. I just explained it.

This discussion is preserved as it was. New answers, comments, and votes are closed.