Verifying prices on server--should I have duplicates in serverstorage or check merely replicatedstorage

so I just thought about this

I planned for my server code to verify prices of items (that was going to be duplicated to server storage for server related stuff)

But wouldn’t it be equivalent to checking replicated storage’s contents? since any client changes are not recognized by the server–with that in mind, I can rely on replicated storage entirely for the shirt, assetid, applying to player, etc, instead of making duplicates in the two storages.

Thoughts?

2 Likes

Yes, definitely avoid duplicating code or assets if you can. Your server script must still verify the price of anything when it is purchased. In fact, don’t even send the price or how much money the player has from the client. Just send what the player wants to buy, and let the server figure out the rest.

2 Likes

Yes i understand that part, I for some reason I initially thought that even checking (not receiving price, but checking price in rep storaged based on server view) on the client-visible storage was bad but I just suddenly realized that the client changes wouldn’t even be detected by server anyway.

thanks for assurance

3 Likes