Hi, I'm making an anti-cheat and I want to have users who are ignored in the anti-cheat, I have ID's in an array and I just need to check if a player id is in the array. I currently have
local AdminIDS = {109811710} -- My ID
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local Character = player.Character
local RootPart = Character.HumanoidRootPart
while wait() do
--Speed Detection--
local Pos1 = RootPart.Position
wait()
local Pos2 = RootPart.Position
local difference = ((Pos1 - Pos2) * Vector3.new(1, 0, 1)).Magnitude -- for speed hacking
local Ydifference = ((Pos1 - Pos2) * Vector3.new(0, 1 ,0 )).Magnitude -- For jump hacking maybe
if difference > 1.7 then -- checks if the user moved too much
RootPart.Position = Pos1
end
end
end)
end)
I want to check if the player.UserId is in the AdminIDS table, I have tried if has_value(AdminIDS, player.UserId) but that function doesn't exist. Any help is greatly appreciated

2 comments
Better, use table.Find(AdminIDS, UserID)
table.Find(AdminIDS, UserID) If it finds and matching id, it will return the index, if not it will return nil, soo just do if table.Find(AdminIDS, UserID) then print("Found")