Not exploitable RemoteEvent

Hi would this work to prevent exploiters from firing the remote event?

local debounce = false

game.ReplicatedStorage.ClothingChange.OnServerEvent:Connect(function(player, value)
	if not debounce and player ~= nil then
		debounce = true
		delay(5, function() debounce = false end)
		if value ~= nil then
			print('not nil!')
		end
		debounce = false
	end
end)

It will keep them from firing it more than one time every 5 seconds, yes. It won’t keep them from firing it though.

correct, but on the client side i was thinking of adding an attribute password just realized it’s not working, do you know if it is?

wait()
script:SetAttribute("Password", nil) 
local Password = script:GetAttribute("Password")

print(Password)

Not sure what you mean. That would just overwrite any attribute called “Password” on your script and set it to nil.

Anything that’s replicated across the client-side would not be secure whenever you got exploiters messing with your LocalScripts

1 Like

correct im trying to make it where the script checks the attribute (password) and then fires the event with the attribute, the server then checks to make sure that the attribute is the correct argument and if its not it ignores

Exploiters can just grab the attribute. Focus on securing the server first.

If you want to add a “password” so badly, at least make it dynamically generated/decoded, so that they can’t recreate it in a straightforward way.

1 Like

No point they can do what ever they want to on the client.