I’ve been thinking of an Anti Remote Cheat to prevent exploiters from firing remote events from their client. But I wasn’t really sure if my method was going to work.
And here was my method:
-
Adding an attribute number as a password to my local script.
-
Then storing the attribute inside a variable in the client side and then it removes the attribute password from the local script:
Client Side
local Remote = game.ReplicatedStorage.RemoteEvent
local Password = script:GetAttribute("Password") -- stores the password in a variable
script:SetAttribute("Password",nil) -- removes the attribute from the local script
Remote:FireServer(Password)
Server Side
local Remote = game.ReplicatedStorage.RemoteEvent
Remote.OnServerEvent:Connect(function(Player, Password)
if Password ~= 5555 then -- if the password was not correct
Player:Kick() -- kick the player
else
-- script here
end
end)
If the exploiter have the ability to View the local script. He would still not be able to see the password since the exploiter can’t print out the value of the local variable and at the same time the attribute password was removed once the script ran so he can’t view it.
And my question is: Will the exploiter be able to see the argument which were sent to the server? If he can then how can I protect my remote events from being fired by exploiters?