How do I save guns on a DataStore?

Hello everyone. I’m currently making a game where I need to save bought guns for another session. Is it possible to do so using datastores? If so how? Thanks for reading.

2 Likes

You can put the names of the guns that the player owns in a table and then save that table when the player leaves the game. Similarly, get the table from the DataStore and read its content when a player joins the game, and give the guns to the player.

2 Likes

Agreed. I also think you should look into concatenation of your tables in the event that you have a lot of different guns with different mods.