Do I Use Datastore or String Values?

I’m creating a Fortnite-like locker system. When opening the locker, you’re presented with different types of items, such as chutes, backpacks, and tools. If I wanted to set the image ID of each type based on the item equipped for it, would it make more sense to save the item to the datastore when selected and then access that for the image, or to create a string value inside of the type containing the name of the equipped item?

The datastore would be needed later anyway, but I’m wondering if that would be too many pushes and pulls to the datastore and if I should save data when exiting the locker instead.

1 Like

Players might spam opening and exiting. So that’s not an option, considering how many requests you will be given . It’s not infinite.

You will have to save at intervals of every minute and every five minutes and connect to events in case the server crashes or other events you’d like

store it ingame. datastores are for cross-session user data.

Can I not just check if anything is different, tying into ingame data, and then save? Or just save when the user exits and enters the game?

I use JSON En/decode to convert from table to string and vice versa and then store string in a stringValue Instance Inside the container. That way, it was easier to access, dont use DataStore because this is not use case for it.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.