the title explains it, I’ve tried using the Died function and checking if the humanoid’s health went to 0, none worked
if script.Parent.Humanoid.Health == 0 then
script.Parent.Humanoid.Health = script.Parent.Humanoid.MaxHealth
fyi, loops dont work either
Your trying to make a player get max health when he kills another player, or an npc that when it kills the player gets maxhp?
no, im trying to make a test dummy that instantly heals as soon as it ‘dies’, and I dont want to use respawning. I’ve seen what im describing in a different game.
I think the only way is to respawn the dummy as fast as possible, you cant set the dummy to maxhp when the humanoid already died so do a script with a respawn delay of 0.1
how would i respawn it where it died?
If you group the dummy in a model and inside that model you put this script it should respawn it instantly.
local Model = script.Parent
local CurrentFigure = Model.Dummy
local Figure = CurrentFigure:Clone()
local RESPAWN_DELAY = 0.001
local CanSpawn = true
CurrentFigure = Figure:Clone()
CurrentFigure.Parent = Model
if Object == CurrentFigure and CanSpawn then
if CanSpawn then
CanSpawn = false
CanSpawn = true
does it have to be a model? or can it be a folder
Yeah but change model and currentfigure variable
i thought its not possible but changing the hum state and setting
BreakJointsOnDeath to false works to me
local Humanoid = script.Parent.Humanoid
Humanoid.BreakJointsOnDeath = false
Humanoid.Health = Humanoid.MaxHealth
Also needs to be a server script