Remote events protection

How to find what is the script that fired the remote so i can do something like

If scriptThatFires.Parent == nil then
Player:kick("stop trying to make no cooldown scripts")
end 

Edit: exploiting scripts hides itself in nil thats why im checking if its nil is its parent

1 Like

I’m not sure if this is an ideal way of handling exploiters. But from my knowledge, I don’t think this is possible, as to know what script fired the remote event, the exploiter itself has to send (an) argument(s) of the script’s properties (name, instance) etc. which is something the exploiter obviously wouldn’t do. I just dont think this is the way to handle exploiters.

Sending the name or these stuff wont help because exploiter can just copy the event’s arguments from the remote spy

I am not sure if you can check the source the remote was fired from. But if you want to prevent an exploiter from non-stop firing remotes, you can type something like this on the server:

local remote = -- The remote's location
local cooldowns = {}

remote.OnServerEvent:Connect(function(player)
    if table.find(cooldowns, player) then
        player:Kick()
    else
        table.insert(cooldowns, player)
    end

    -- Other code here (that removes the player from the cooldown table after time).
end)

Ok but imagine if a laggy player fired them twice?

Don’t think it would happen even if it’s laggy

Ok thanks for both of you for help

I never suggested to pass properties as arguments, as I have stated, the exploiter can easily bypass that, just by not sending any arguments in the first place. All I said was that this would be the only way to find what script fired the remote event, (which is obviously not a recommended way to deal with exploiters).

Just return (stop the code) instead of kicking them.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.