a question about table.HasValue()

im trying to find players in a place, trying this



 	local tablefindplayers = ents.FindInSphere(Vector(-3030.606689, 5.961421, 763.873596), 50)
 	PrintTable(tablefindplayers)
 	print(table.HasValue(tablefindplayers, "Player")) 


i find the entities as needed, but how do i filter players from it?
printing returns false.

You have 2 ways
The first one will check the table via hasvalue, or you just can check if the player that you’re looking for it’s there and then return the value, so you don’t have to continue iterating the table

Also…Players are userdata, not strings

[lua]
tablefindPlayers = {}

for k,v in pairs(ents.FindInSphere(Vector(0,0,0),100)) do
if(v:IsPlayer()) then
table.insert(tablefindPlayers,v)
end
end

return table.HasValue(tablefindPlayers,player.GetByID(1))


for k,v in pairs(ents.FindInSphere(Vector(0,0,0),100)) do
if(v == player.GetByID(1)) then
return v
end
end
[/lua]