So, I've trying to make an anti-backdoor script so that it will check every remote in ReplicatedStorage to see whether it's name is on the AllowedRemotes table, but it deletes every remote inside of ReplicatedStorage. Any help?
local RStorage = game:GetService("ReplicatedStorage")
local AllowedRemotes = {
"DefaultServerSoundEvent",
"AddCharacterLoadedEvent",
"RemoveCharacterEvent",
"SoundDispatcher",
"OnNewMessage",
"OnMessageDoneFiltering",
"OnNewSystemMessage",
"OnChannelJoined",
"OnChannelLeft",
"OnMuted",
"OnUnmuted",
"OnMainChannelSet",
"ChannelNameColorUpdated",
"SayMessageRequest",
"SetBlockedUserIdsRequest"
}
while wait() do
for _, v in pairs(RStorage:GetDescendants()) do
if v:IsA('RemoteEvent') then
if AllowedRemotes[v.Name] then
-- do nothing
else
v:Destroy()
end
end
end
end

1 comment
Filtering enabled blocks most client changes from replicating to the server. There is no need to do and "anti exploit" checks if you validate the remove event requests correctly.