Help with datastoring string values

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I’m trying to save a buncha Value’s names in a folder in a character
    Like I made a system that adds a string value with the same name as a sword that a player had just purchased and adds it into a folder in the player’s character. I want the string value to save (specifically the name of the string value) when the player leaves so they don’t have to rebuy it. Instead, they can re-equip it since they bought it when they rejoin.

  2. What is the issue? Include screenshots / videos if possible!
    I don’t know how save instances

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I tried using datastore (I’m pretty new to it) but it doesn’t work. It works when saving the values of a value (like coins in the leaderboard) but it just doesn’t work! I tried youtube tutorials and it still doesn’t work. Pls help me

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

-- This is an example Lua code block

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

Here is how I would do it, loop through folder with GetChildren insert every value’s name into a table and save that table with DataStoreService, if it doesn’t save in studio you have to enable studio access to API services from game settings.

To prevent data loses make sure u are using pcall and BindToClose event.

Thanks yeah i figured out how to save the name of the string value and load it properly myself. Im much better at datastore now :slight_smile: