Is there a way to have players’ tools save when they die/reset? I have a custom toolbar system and I can’t figure out how to save a player’s tool upon death. Any help would be appreciated, thank you!
There is a built-in system for this called StarterGear, assuming your custom hotbar system is dependent on the player’s backpack itself, you can just insert their tools into this child of Player to auto-load it into a player’s backpack whenever they respawn.
In my game I have parts that when players click, a tool is cloned and put into their Backpack folder. Should I rather put it in the StarterGear instead so it will save when a player dies?
Clone it into both Backpack and StarterGear then remove it from both when the player loses a tool (i.e drops it/sells it).
What @Imp_erator said
You’d do
local toolClone = tool:Clone()
toolClone.Parent = player.Backpack
toolClone:Clone().Parent = player.StarterGear
or
tool:Clone().Parent = player.Backpack
tool:Clone().Parent = player.StarterGear
If you need a tool saving system on rejoin, message me and I can do it as a commission.
Do you have any advice on what to do if the tool has specific stats? For example in my game I have a tool that has a “Uses” value. When the player activated the tool the uses value subtracts 1, and when the uses value is 0 it removes the tool.