How should i store player characters and skins?

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 am trying to ask for help on what way should I store a player’s characters and skins (including what they have equipped kind of like in forsaken)

  1. What is the issue? Include screenshots / videos if possible!

The issue is I don’t know how I should do it, I’ve tried tables but they’ve made things more complicated for me

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I’ve tried tables, for something like making a table with folders and configurations, it seems wrong for some reason

1 Like

Well dictionaries will definitely be your best friend for this, and you can easily save those into a datastore

2 Likes

How would I retrieve it for like a shop script or an inventory checker

Also could you send like an example of a dictionary with said things in it?

Well honestly the best way for accessing data is too like have a cache that you change, instead of the data itself, and once the player leaves then you get their cache and save it to the datastore

I think you should look into like data saving

As @finaIlyhappy said, you can use a dictionary for that. I suppose the player is going to choose their skin and character appearance in another place, like a lobby. An easy way to send data between them is with DataStores. When a player joins Place A, they choose their skin and appearance, and store it on a DataStore with the player’s ID, for instance. When player joins Place B, they will get the DataStore with their ID. You can iterate through the table indexes, and change the player’s default accessories and skin with the value.

I have no idea what a cache is :sweat_smile:

Nah it’s all done in the actual game itself from the UI

A cache can be as simple as a folder named “PlayerData” with another folder of all the player’s data inside with stringvalues, boolvalues, etc. Instead of constantly updating or grabbing a datastore, you’d update and grab data from said cache. Then you’d only need to grab and update the datastore when the player Joins or Leaves the game.

1 Like

This post may help. A Basic Guide To Caching For Roblox Lua