Hello,
I am currently trying to make a system that automatically removes any new added remote events to ReplicatedStorage to prevent exploits. I've been looking everywhere as to how to make this but I haven't found anything. I had been originally thinking of making a loop to destroy any ChildAdded instances however I am unsure how to destroy any added instances. If I could get any help with this it would be great.
Thanks!
You were right in your thinking process. To do what you want to do you can create a loop. You can do the following...
while true do wait(1) for Event, in pairs(Events) do if not RS:FindFirstChild(Event.Name) then Event:Destroy() end end end
The above isn't perfect but it's the gist of how to do it.