How Do I save an In-Game Player Avatar

so i have an avatar editor in my game and when the player leaves the avatar they created isnt saved. How do i save the avatar so when the player rejoins its put back on

1 Like

I suppose you have a selection of avatar items your players are limited to wear. In such case you could serialize each item with a string, which you could then load upon the characters on joining.

the thing is i have over 120 avatar items for players to choose from and adding strings for each item would take a long time. Is there a way to make a script for datastores to save players character and load it back up when rejoined?

I’m afraid its not possible to store instances in data stores:

“Since the data store name, key name, and scope are strings, their length can be checked with string.len(). The data (key value) is also stored as a string, regardless of its initial type. The size of data can be checked with the JSONEncode() function that converts Lua data into a serialized JSON table.”

I found this at: Data Limits