Hi, this question has been stuck with me for saving the player’s data. What’s the best way? Is there any way to ensure that the data is not messed with?
When I create the data, I use instances and save it inside the player. I know that there is a better way to do this. I’ve seen another user save the data in ServerStorage and create a folder with the username and data inside of it. Is that an ideal way?
If someone could help me make the best decision, that would be great!
I already use datastore2. I just need to know for usage of Datastore because I can’t be fully dependent on datastore2.
For me I use every datastore that is very useful, currently I am using AeroGameFramework by sleitnick and it’s DataStore System is pure gold
There’s typically no way for a client to tamper with data since it’ll be held on the server, assuming you’re applying proper data practices and not allowing the client to overwrite data (exceptions for rare occasions, ex. single player games and client game settings).
When it comes to player data, the typical recommendation is that you hold it in ModuleScripts. I usually only use ValueObjects if I need the replication of values via the engine. I have, though, debated and been told on a number of occasions that this is a bad practice - whether that’s true or not, I don’t really care (or maybe I still do a bit). It’s definitely easier to work with a dictionary than it is ValueObjects though, plus it allows for more extensibility on your data systems.
It really does depend on your use case. If you want a recommendation from me, I’d probably go with the method of using ModuleScripts and dictionaries for data. ValueObjects are a convenience tool and I might use them if I’m too lazy to make a proper system, otherwise I might employ them only for the sake of providing information to the client without firing remotes constantly.