I’m trying to script trading in my game but I’m concerned about item duping where a malicious player disconnects right after the trade and logs back in with items that were supposed to be traded as well as items obtained from the trade. I know this has been a problem in games even outside of roblox and am interested in hearing how developers would go about tackling this. Here are some of my ideas that may or may not work, in order of complexity.
I would appreciate any ideas or comments about this topic.
when the 2 players agree to trade, delete and save the traded items from the respective players.. don't make frequent Datastore calls, just simply save the items that should be put in datastore some other way, then when the player is leaving, or your doing a periodic datastore saving session you save the data in datastore.. this method fast and will allow you to process the trade faster than a player can dupe, Datastore calls are very expensive, and can easily fail if "overcalled".
Closed as Primarily Opinion-Based by User#23252
This question has been closed because it is a discussion about a topic focused on diverse opinions, which isn't a good fit for our Q&A format.
Why was this question closed?