Roblox Trading System

I’d suggest storing all kinds of data related to the trading system on server via tables, dictionaries, variables etc… Doing everything in a folder would somehow allow an exploiter to check and understand how the system runs therefore find any vulnerability within it, I am not too experienced with them but I can somehow figure an idea of how you could make this work.

First I would suggest taking a look at ProfileService, it offers session locking to clients which is very handy in systems where data is being exchanged and it could prevent duplication of items.

Second, you could have remotes such as ItemAdded, TradeSent, ReadyForTrade, DeclineTrade etc…
try not to be greedy here with resources/performance being used, even though it might sound terrible, it’s better to do it rather than risk the system be exploited.

Third, you need to always focus and check if the player left the game and if the trade was being done while any of the players left, this is what causes errors on the server side, and therefore can create duplications of the items.

I’ve never done a trading system myself, however I’ve fixed some of them from other developers and this gave me an idea of how it works. I hope this somehow contributes to your knowledge and maybe you’ll figure out everything yourself, and remember never to overthink this kind of stuff, it really harms your productivity!

Edit: If you’re making folders as somebody said here, it’s always being replicated to all the clients and, all it does is just take memory, and network traffic which isn’t the best thing nor something you want to happen.

1 Like