Datastoring players hat issue

So I am trying to save the value and name of a ‘StringValue’. I’m doing this because I want to separate the hats and the hairs by the value. Explanation - When the character has the hat on, it will send a ‘StringValue’ to the folder that is on the player and the value of the ‘StringValue’ will turn into ‘hat’ since its a hat and the same thing with the hairs.

The problem I am having is saving and loading up the value and name of the hair/hat into the folder that is in the player. And the player being gifted the hat/hair.

The solution I tried is changing up how the tables are saved and nothing worked.
All I am looking for is assistance on how I can get this to work or alternative methods of splitting the hairs and hats in data storing and how you did it for your character customizer.

2 Likes

You can’t save a table to datastores, you’ll have to convert your table to a JSON string with HttpService before saving it to a datastore:

HttpService:JSONEncode(worn)

This is not necessary since Roblox itself converts data to a JSON string upon saving

Oh, did they change it? If so, I apologize because I haven’t developed anything on Roblox for a few months. :sweat_smile: