Remote Event Questions

Remote Event Questions

Hello, I have a couple questions concering remote events, For my first question, Is passing arguments client sided to the server using remote events exploitable, example

local amountofCoins = 1000
remote:FireServer(amountOfCoins)

It’s very concering to me since i do not want a player to try to exploit MarketPlaceServer type Assets that depend on parsing remote event parameters, if this is not the case then please let me know, im currently making a Shop GUI with Developer Products that rely on 1 Remote Event So i just need some info if this can be exploitable, if this is a bad way to make it please let me know

  • Sta
1 Like

1 word answer: Yes

Explanation: Exploiters can see anything that’s client-sided inside the game (That includes LocalScripts, UI’s, Lighting, etc)

You could just handle the variable on the server instead if you don’t want them to change the amountofCoins variable

Oh i see, its cause im trying to make a marketplacesystem that relies off 1 remote event, parameters, does that mean i have to make a sepreate remote for each asset?

yes that is a very easy to exploit that script. Exploiters can see whenever a remote is fired using stuff like remote spy and will see the fired remote followed by all arguments, they can take advantage of this by firing it multiple times or changing the argument to whatever amount of money they want.

All local scripts are also able to be seen, disabled or removed, that’s why you have to hide anti cheats well. They also don’t need to wait for the remote to fire if they look through all local scripts.

you should do something like this to prevent the client from being able to exploit:
note this is a simplification

Client:

local ItemToBuy = "Cookie";
Remote:FireServer(ItemToBuy);

Server:

local ItemPrices = {
   Cookie = 10;
};

Remote.OnServerEvent:Connect(function(player(item)
   player.Coins -= ItemPrices[item]
end)

why did you put a not equal on

   player.Coins -= ItemPrices[item]

just wanna know, im still not very advanced into lua.

not equal is ~= and that would probably be minus instead of typing

player.Coins = player.Coins - price

i wanna know why exactly he put -= on that part

You were just given the answer, it is a shorter way of doing this:

value = value - 1

Ohh i see i misread it thanks

//////////////