How can I fight against exploiters?

I’m making a module for placing down parts on a grid and each player has their own plot, the module is run in local scripts and I’m sending information on where the part is located and if the plot is their plot to the server but I’ve heard that exploiters can send whatever they want through remotes, one piece of information I’m sending is (see below)

local mousePosition = UserInputService:GetMouseLocation()
local mouseRay = camera:ViewportPointToRay(mousePosition.X, mousePosition.Y)

local raycastResult = workspace:Raycast(mouseRay.Origin, mouseRay.Direction * 1000)

I’m sending raycastResult.Instance through a remoteFunction and I’m not sure how I’m going to make sure that the client is “telling the truth” that this instance is actually the instance that it hit.

How can I confirm this or am I doing it wrong by using a remoteFunction?

You can’t stop them from sending stuff though remoteFunction, BUT you can have a check on the server to see if it is there plot.

1 Like

This should be validated by the server I think.

The truth does not matter if the part is on the player’s plot right? It seems like all an exploiter can do is ruin his own part placement.