so I have this "Anti-Cheat" I'm trying to make but Its literally saying Chat is not on the exceptions even though it is I'm super confused even though it's probably simple :/
player.PlayerGui.DescendantAdded:Connect(function(Descendant) if Descendant:IsA("ScreenGui") then print(Descendant.Name) if Descendant.Name ~= "Chat" or Descendant.Name ~= "BubbleChat" or Descendant.Name ~= "FreeCam" then print(Descendant.Name.." is not on the exceptions ") player:Kick("Anti-Cheat:"..player.Name.." Banned for 99999999 days jk just don't do it again -_-") end end end)
I figured it out I don't know how this makes much of a difference at all but it works I just have to use a bunch of elseifs here's the code if anyone ever has a similar issue or just wants to steal the code:
print("Anti-Cheat Loaded") local player = game.Players.LocalPlayer player.PlayerGui.DescendantAdded:Connect(function(Descendant) if Descendant:IsA("ScreenGui") then local name = Descendant.Name print(name) if name == "Chat" then print(name.." is on the exceptions ") elseif name == "BubbleChat" then print(name.." is on the exceptions ") elseif name == "Freecam" then print(name.." is on the exceptions ") else print(name.." is not on the exceptions") player:Kick("Anti-Cheat:"..player.Name.." Banned for 99999999 days jk just don't do it again -_-") end end end)
p.s. the point of this script is to make sure an exploiter can't add a Gui in PlayerGui just add a elseif for all of your Guis