Basically Notoriety. Check out that game btw. When NPC look at you that detect you, but if you behind a wall, they don't detect players.
I tried making a hat for the NPCs that will touch a player if he/she is in the NPCs sight. But it goes through walls so that doesn't work.
Please help me. I have no idea what to do, iv been thinking about this for more than a year.

4 comments
So I tried NPC.Humanoid.Camera but it doesn't exist, how do use this information you gave me to make the NPC see other players?
you need to insert a camera object in the NPC, then set the camera subject property to the humanoid of the NPC, and i am sure that should work..
here is a useful link: https://developer.roblox.com/en-us/api-reference/property/Humanoid/CameraOffset
also btw, the reason why you can't access Humanoid.Camera is b/c it's not a property field of a Humanoid: here is a list of all properties of a humanoid: https://developer.roblox.com/en-us/api-reference/class/Humanoid