So I have an NPC that just scans the area around itself for players. Here's the script
local region = Region3.new(Vector3.new(hrp.X - range, hrp.Y - range, hrp.Z - range), Vector3.new(hrp.X + range, hrp.Y + range, hrp.Z + range))
local parts = game.Workspace:FindPartsInRegion3(region)
for a, b in pairs(parts) do
print("----")
print(b.Name)
print(b.Parent.Name)
print("----")
if game.Players:FindFirstChild(b.Parent.Name) then
print("Found player!")
person = b.Parent
end
end
(hrp is the NPC's HumanoidRootPart) (range = 15)
I get all the outputs but the output spits back everything that isn't part of my character. Here's what the output generally looks like
RightUpperArm
Dummy
----
----
LeftLowerLeg
Dummy
----
----
LeftFoot
Dummy
----
----
Handle
Rock
*(Note: Rock is just a tool)
----
----
Handle
PaperHat
----
----
LeftUpperLeg
Dummy
----
Yeah it usually just detects itself and the house around it, even when I walk close. I can provide the entire script if it's neccesary, but I just included what I felt to be important.

3 comments
region3 doesn't like you.
I think my region3 is in the wrong place... is there any way to visualize region3s?
yeah there is, just place parts and see if it is detected.