I’m making a game that I want protected against exploits. To do this, I came up with an anti-exploiters-gui script that would detect if something unexpected would be inserted into the core gui (via the client).
This is what I made:
local plr = game.Players.LocalPlayer
local AllowedNames = {}
game.CoreGui.ChildAdded:Connect(function(Obj)
if (not AllowedNames[Obj.Name]) then
plr:Kick("Do not cheat.")
end
end)
I know there is nothing inside the AllowedNames table.
If I run this, the error
The current identity (2) cannot Class security check (lacking permission 1)
occurs. Can anyone come up with a solution?