Why would I put save info in server storage over replicated storage?

See everywhere that it is better to put save data in server storage over replicated storage. why is this the case?

I need the client to be able to see the data. The player can’t interact with it.

save info as in?

elaborate pls

Store items in ReplicatedStorage only when the client needs to access them. Otherwise, keep them in ServerStorage to prevent exploiters from getting them.

For example, you should store tools in ServerStorage to ensure they remain secure from exploiters.
As for you I don’t know what you mean by “data”, can you be more specific?

If you are talking about the player data then, you can replicate the data by using remotes, to get the data and update it.

1 Like

Data should be kept away from the client for security, but if you want the client to have access to certain data use remote functions to return that data via a get request.

This kind of getter / setter format is used in object orientated programming too.

It’s also generally harder for an exploiter to find vulnerabilities in your game if they don’t know how your game works so the less you give them to work with the better.

1 Like

Save data. Like points, weapons, etc.

1 Like

I’ve heard of that before, but why keep it away from hackers. They won’t be able to change any of it.

1 Like

i mean tbh, why show it to them in the first place
just keep it hidden :grin:

1 Like

I have a inventory system. They need to see it for the system to work.

1 Like

I am currently making an inventory system, but the only things visible to the player is the inventory GUI with a local script and the remote in replicated storage. The GUI triggers the remote which sends the info to a module script which checks against the datastore (ProfileStore by loleris) info to see if the player has the item (when using) or can buy the item (when purchasing). The server module also sends info back to the player after purchase to show quantity of item. I only have a few items in my game, but I believe this is the recommended way of making a “secure” game inventory. “Replica” by loleris may be even more secure than the remote event and less likely to error if you are willing to go down that rabbit hole. It would just reference datastore tables, if my understanding of it is correct.

Please correct me if I made any mistakes in my understanding of best practices.

1 Like