How can i make "Tools Database"

Hello there devs! I am making one game of mine and I have this problem.
I have tools in-game that I want to be saved when a player leaves the game.

I didn’t really found help over there so I asked the dev forum. I have tried many solutions and by far none of them worked.

1 Like

Seems like you wanna use DataStores

Yea, i need them for those tools. I am bad at scripting, what would i be in databases? lol

Just study them really. I took a day to learn them and it turned out easier than I thought. You could go to the Roblox DevHub or watch some of the DataStore tutorials by AlvinBloxx he makes them easy to follow too…

Here are some DevHub articles to get your started.

Data stores

Saving player data

Datastore errors and limits

Watching some youtube tutorials are nice too.

A tools database would require a Datastore.

A good concept would be:

  • When the player leaves you can use Humanoid:UnequipTools() to get all the tools into Player.Backpack. After that, you can get all the children of backpack and add them to an array by adding their tool name and then use UpdateAsync() to save them.

  • When the player joins but has a save file, you can check that by using GetAsync() and then use a for loop to check the content of the save file. You will need to store all of the tools that you wish to get saved in a folder, in ReplicatedStorage or ServerStorage and then, for each element of the array, check if the name of the variable is found in that folder by using :FindFirstChild() and if does not return nil then you can clone the tool into the player’s backpack.

But again, you can check tutorials and I’m sure you will understand how it is done.

Can’t you save the tool/mesh ID as a model and then load it in when a player joins?

Player buy these tools yk… When they leave they are not in backpack.

I can’t understand Alvin’s videos. I don’t hate him, but his videos just make me even more confused :confused:

How to Save Tools using Data Stores - Roblox Studio - YouTube this should help u