How do I delete a String Value from a player when they die?

Hello, I was wondering how I could delete a String Value from a player when they die?

If you store the string value inside Player.Character then it will be deleted every time they respawn.

Otherwise you could just bind it to the humanoid death event

Humanoid.Died:Connect(function() String:Destroy() end);
2 Likes

Should I do Player.Humanoid or Player.Character.Humanoid?

Player.Character.Humanoid

:slight_smile: :slight_smile: :slight_smile:

Could you check if their health is equal to 0 if so how could I do it? Because that doesn’t seem to be working for me.

You could butttttttt

It would have to be in a loop checking every x amount of seconds and it would halt your program until that condition was met. Event driven programming is a lot more efficient and will keep your code a lot cleaner.

Oh ok that’s true I guess well I will try to fix my code to work with that.