Reset Replicated Storage When Player Resets

  1. What do you want to achieve?

A script that resets replicated storage when a player resets, so that if a tool from replicated storage has been used and then dissapears on reset, they can still get it again without having to rejoin.

  1. What is the issue?

What I did was clone the tools in replicated storage however upon doing this it prevented a seperate script from working because they all have name (I cannot change the name of the part as it will prevents even more scripts from working, so unfortunately that isn’t an option.)

  1. What solutions have you tried so far?

Duplicating the part as mentioned above, didn’t work for the reasons also mentioned above.

I’m not even sure if this is possible in any way, shape or form but any help would be greatly appreciated anyway.

1 Like

Try putting the tools you want in Starterpack. all the tools would reset on death. You could add a list with all the tools the player had when they died and clone them into the Backpack on respawn

1 Like

Thank you! The only issue with this is I have a tool giver GUI where you type in a player’s name. By adding it into starter pack (from what I know, correct me if I’m wrong) all players are given the tools when they join the game. I should’ve explained my situation better, I apologise!

The StarterPack from what I recall doesn’t save when you leave, so when you rejoin, all your tools in there are gone, they only get the tools back if they respawn and have tools in the Starterpack

Edit: I’m not sure if I’m confusing StarterPack and StarterGear, forgive me if I am

1 Like

If you want them to save what they have you would need to get into Datastores

1 Like

Adding tools into starterpack isnt a good idea if it’s on the server, I recommend backpack, also snippets of code is recommended or we can’t really help with your issue. Regarding it again you can store Player data in a dictionary eg Tools = {“LinkedSword”,“Pistol”} then do a for loop in replicated storage for it (however I recommend saving tools outside of replicatedstorage)


I see, I think you may’ve accidentally replied to the wrong person since @fyreflyyoutube was the one that first mentioned if they’re given the tools when they join the game, I was just stating that it’s reset on leave

1 Like

Anything in the players backpack removes on leave/reset but in starterpack it saves. If you want something removed on reset from starterpack you could make it a script to destroy or on join make a script where it gives the tool.

1 Like
          local Clone = Tool:Clone()
          Clone.Parent = Player.Backpack

You can use this script to put a tool in someones backpack on join.

Hope this helps.

1 Like