Hey there.
I wanted to understand how to create an anti cheat for a game. Previously I have seen the idea of going through the whole game looking. I have been told this could and would create a lot of lag within the game and generally just a bad idea and well the client can basically 'spoof' it. What would be the best way to eliminate lag while also eliminating exploiters?
My goal here is to eliminate exploits from being injected but that is most likely impossible. So my new goal is to prevent data from being tampered with. My idea to this was probably checking through remote events at first to see if data was tampered with as I had no other idea on how to check once injected on.
The main idea I had was most likely using the _index metamethod. If the table’s index metamethod returns a value, rather than returning nil, the index would return the value that was returned from the function.
local metat = {
__index = function(self, index)
return index.."value"
end
local tabl = {
["human"] = 1,
["goblin"] = 0,
}
setmetatable(tabl, metat)
print(tabl["Correct "])
}
Similar to this, how would I correctly send it between the server and the client to prevent cheating of spoofed data or better yet how could I check if data on the server is not tampered with?

2 comments
"how would I correctly send it between the server and the client to prevent cheating of spoofed data?" Are you making a client sided anti exploit? People will easily bypass it by removing the code for it...
I am not attempting to make a client sided exploit.