Now, say another player wants to heal the humanoid. How do I change the state so it can run again? I have tried a few ways. But I couldnt figure it out.
yeah you can’t revive a player from death. once that HumanoidStateType.Dead is reached, there’s no coming back. to achieve what you want i can think of two ways to do it:
clamp the player’s health. make a function that checks if the player’s health is about to reach 0 or under, then connect that function to the HealthChanged event of the humanoid. done right, this will prevent the humanoid from dying. you can script the rest for disabling the player/activating ragdoll/stopping regeneration when the health falls under a certain threshold.
have a fake health bar. instead of using the :TakeDamage function of the humanoid, make your own custom function that affects your own custom health system. then when the player takes enough damage, you’ll handle all the effects based on the fake health.
You could use Player:LoadCharacter to respawn the player, moving the character immediately to the location it died at. Though I haven’t tested this, so I’m not sure if it’ll be completely seamless.