How can u save your data of tools I made a button that will give sword if you have 1000 Coins and put it on Backpack and Starter Gear But it won't save when i leave the server and rejoin back again I want to save it but I don't know how to save it please help me.
How do you save tools when leaving the server?
3 answers
Check this service DataStoreService as well as theses functions UpdateAsync and GetAsync. They will help you. There are code samples at the end of these pages too.
Take into account you can't save Instances, but you can save a value like a string or a boolean value to know if someone should have the item, and then give it to them.
You can't exactly save a tool using the DataStoreService, but what you can do is save a value, such as a string or a number that identifies what tool they have upon leaving. Then, you will be able to add the tool to the players backpack once they joined. If this is the answer you needed, please accept my answer! If you need any more help, feel free to ping me in the community chat. Thanks!
I'm not sure if I'm meant to post YouTube tutorials, but this one by Shirooo may help you out. I have followed another one of her tutorials (for player list) and it was easy to follow and well explained.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
why no show script?, anyway, use datastore service to set async of the tools name, and when a player joins clone the tool to their starter gear and backpack if they have, so like if savedTools:GetAsync(plr.UserId)~=nil then game.ServerStorage.Tools[savedTools:GetAsync(plr.UserId)]:Clone().Parent=plr.Backpack game.ServerStorage.Tools[savedTools:GetAsync(plr.UserId)]:Clone().Parent=plr.StarterGear E