I want to achieve something that makes the server and the client pass through a GenerateGUID via RemoteFunction every 2.5 seconds and if the client isn’t passing the key for 8 seconds, the server will kick the player, the issue is that i don’t know how to loop this or detect if the client hasn’t responded back with the key plus i also get this error:
I only tried these which are also right now the current state of this whole thing:
Server script:
local HttpService = game:GetService("HttpService")
local PingPongFunction = game.ReplicatedStorage.Functions:WaitForChild("PingPongFunction")
local Counter_Value = 0
game.Players.PlayerAdded:Connect(function(Player)
local GeneratedKey = HttpService:GenerateGUID(false)
while wait(2.5) do
local Ping = PingPongFunction:InvokeClient(Player,GeneratedKey)
if Ping == GeneratedKey then
Counter_Value = Counter_Value + 1
end
end
end)
Localscript:
local PingPongFunction = game.ReplicatedStorage.Functions:WaitForChild("PingPongFunction")
PingPongFunction.OnClientInvoke = function(Key)
return Key
end
If you can not help with these problems, do not reply, thanks for understanding.
Also, you are returning the key the server gives to the client, so if this is some attempt at an anti-exploit, you aren’t going to kick anybody with this.
Yes, this is what i’m trying to achieve that if the client doesn’t give the server back the key in atleast 5 seconds, the server is going to kick the player I’m trying to achieve this
I didn’t add it but i have an event that will instanly ban players when they delete/deactivate specfic localscripts, and right now that checking is in the wrong place because the checking for these localscripts is inside a localscript for the userinputservice
No means to discourage you but you might wanna give up on this specific technique.
Exploiters will just be reporting back “all good” consistently so you won’t be able to tell a thing. You are also returning the key the server generates to the client, so they are consistently going to be returning the correct data. Exploiters won’t delete the local script that does this.
You also should not be using RemoteFunction:InvokeClient. A clever exploiter can yield the server doing something like
function remote.OnClientInvoke()
while true do
wait(5)
end
-- OOPS, server will be stalled forever!
end
Exploiters can disconnect your events and they have other ways of killing a script without deleting it.
But it’s pointless. A exploiter can just mimic this behavior and ping it back on their own. They can easily just disable / remove the script that will ban them. / They can just remove the remote / prevent the remote from firing. This is utterly pointless.
In that case you can simply just ignore game secruity because if we think about how the exploiters are exploiting your system you can just think about that some exploiter have server-sided executors
Yes you need a backdoor for it but you can’t use numbers in require() while require() is inside a localscript, you can only use these numbers in a server-script
Literally every anti cheat that is made on the client is useless. Sure it can help to prevent some newbie coders but in the end it helps with nothing but waste your time. I can’t stress it enough. There is no point in doing it. ANY AND ALL ANTI CHEATS CAN BE DISABLED BY EXPLOITERS.
Backdoors are not using require on the client. It uses it on the server and then it is usually creates a RemoteEvent you can fire to execute scripts as the server.