Saving the Equipped Tool on death

How would I go about saving the player’s tool that they were using right before the players death? My game relies on a custom backpack system
where only one item can be equipped at a time and the game is pvp based so the player is dying a lot. For convenience sake I want to add a script to detect what sword the player is using when they die and automatically equip it when they respawn. Any useful tips? I figure you could just set a variable to whatever the characters holding and then clone it, but i’m not sure the exact syntax.

1 Like

You can get the tool inside (when Humanoid.Died fires) the character and being based on the tools name clone the tool into the player’s backpack

1 Like

Search it up, unless theres nothing that helps

There are also models in the toolbox that help save tools

You could set an Attribute for the player named “Tool” or w/e with the value being the name of the tool you want them to spawn with. Have the tool and other tools in a folder in ReplicatedStorage or ServerStorage and when a character is added, look for the tool name from the player’s Attribute in the folder and clone it into the player’s backpack.