Hi, as you may know tools delete from the backpack after a character dies, so I’m trying to make it so that when the character dies, the tools get parented to a folder for that character so then when they respawn the tools can be parented to the backpack. But I’m trying to use humanoid.Died, and it only works the first time around and not the second time. Does anyone know why?
where is the script, this is what i think is happening;
When the character is defined upon joining, it looks at that character, after the character dies, The script is still refering to the character that is now dead, which is now nil but i’m not completley sure, can you add a
print(character)
into the script, then play the script, then kill the character as you’d usually test it, and see if the character is returned as nil
Okay, that’s the problem. when the character dies, the script isn’t reloaded, so it doesn’t define the character again, i remember a solution i made a while ago give me a sec
Actually i just moved the script’s location, will this be an issue for your script or will it work fine anyway? you can put it into startercharacterscripts instead in which the script will spawn again along with the character, defining it again
Trust me I do this in my own game. The exact same thing you are doing (accept I don’t save the tool copies I just give them a new one). The concept is the same. After a player’s character dies. You give the new character assigned to the player the set of tools back or a new set.