How to stop player's character from deleting on death

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want to stop the player’s character from deleting then replacing itself with a new one.

  2. What is the issue? Include screenshots / videos if possible!
    Like I said before, the player’s character gets deleted and replaces itself with a new one on death. This causes bugs in my code as I have a dictionary for the player’s data (that doesn’t save) and the key for it is the character. This was not happening before, so I think I may have accidentally enabled a feature.

Here is a video of the character getting destroyed and replaced:

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I could not find anything on the subject in the dev forum, nor could I find any settings for this.
3 Likes

If you are setting the health on the client side as seen nothing will happen cause on the server you still have full health and for others you look perfectly normal

Hello!

Players naturally delete on death, as that is how they regenerate the limb attachments! I would not recommend storing data in the player. Try using replicated storage to store data or just store it in a table inside a script.

You might have to resort to making your own health system using values

You can use the CharacterAutoLoads property in Players, that stops the player’s character from disappearing until it’s set back to on

3 Likes

Seems like the issue was due to something other than the player’s character resetting. Thanks for all of the responses though!

you could use math.clamp on the humanoids health

2 Likes

I know this turned out not to be your issue, but for anyone stumbling across this post: you can turn off CharacterAutoLoads and spawn players with Player:LoadCharacter()

1 Like