How i can save details pf a hat to pass information to another place?

hello! I’ve been creating a project like retrostudio! I’ve been wondering how I would save hats in the data store! since I use a very simple system to pass information from place to place

first I create a key in the datastore to store the information (for example the hat ID) second I import it into the rig that shows the character, then to save, when you click on a save button, it takes all the information from the character and plays in the datastore

but I had some problems when creating hats! Since I have to export them in detail to appear in other places, it’s quite a problem, the last time I tried to make hats, I couldn’t, as the mesh id was causing problems, so I just removed that part of the script and the keys from datastore

If anyone has any ideas on how I can do this, let me know in the comments, since with these errors, I have no idea how I’m going to make this work!
Thx for reading

1 Like

Serialization.

sleitnick’s plugin https://create.roblox.com/store/asset/1894828823/Object-To-Lua-Serializer?externalSource=www

Here is a tutorial: How to save parts, and the idea of Serialization