The problem with my poorly scripted market from a year ago is I’m sending the cost from the client and checking on the server. (EEEEEEKKKKKK yes this is bad I know don’t blast me ) I was wondering how to check what card they have chosen on the client and tell the server since UI is client side. I was thinking of sending the table location and sending that number to the server and check with the server if they have the right amount of coins instead, how would you handle it?
Cross Server Market? You mean like Multiple Servers? (kinda like Steam’s Marketplace?) That’s COOL!
Quick script
-- Module
local Items = {
ReallyOPCard = {
Name = 'ReallyOPCard',
Price = math.huge,
},
ReallyNoobCard = {
Name = 'ReallyNoobCard',
Price = 0.1,
},
}
return Items
-- Client
local Items = require(Module)
if Player.Cash >= Items[CardName].Price then
RemoteEvent:FireServer(CardName)
end
-- Server
local Items = require(Module)
OnServerEvent:Connect(function(CardName)
if Items[CardName] and Player.Cash >= Items[CardName].Price then
-- Give Card & Take away Player.Cash
else
Player:Kick('HOW DID YOU SEND A REMOTE EVENT WHEN YOU HAS LESS MONEY?! >:(')
end
end)
You can however trick the Exploiters into thinking that they can change the price and then you check if the price is the same on the Server then you delete all their Progress if it’s not
I forgot to mention that I added the Kick just for you to get the idea, I don’t kick the Players tho I just don’t do anything. (Maybe I’ll change that)
A young player feels like they should put their UltraEpicUltimatePower Sword into the Market. However, the developer has recently updated the price of it, but only on the server. Therefore, when another player tries to get it, it sends the server the wrong price, ending with the player having their data erased, and they go and tell everyone that it’s a scam and to not play the game again.
There’s still no reason to revert data or erase it just because the price the client sent is wrong. You don’t even need to kick them for something so minor. If they shouldn’t be able to do something their client thinks they should, just ignore it on the server when it does sanity checks.