I am looking for help, I’m having difficulties finding a working Trading System that actually works for my game, so basically the player have pets and I’m looking for a trading system similar to Bubble Gum Simulator if anyone has a model or something that could help me i have never made a Trading System before but I’m pretty advanced in scripting so no worries I’m just having difficulties making this Trading System, if anyone could help me with that it would be awesome!
We need more info of what you want to trade, where the objects are stored and as what is it stored (IntValue, Group, Folder, StringValue and so on)
I’m looking for a trading system similar to Bubble Gum Simulator I’m guessing that the objects are stored in a folder.
Im not that good at explaining it.
Okay thank you tho hope i find someone to help me
How I trade items is when the trade is made I store the items in the server then remove them from the player1 and 2. Then send player1 items to player2 and player2 items to player1.
can u please send me the model if u can?
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.
Really good point pretty long text too lol thanks man