How to create a vision system that reduces the range of vision depending on what is intersected in front

To give you an idea of what exactly I want to learn how to do, you can see this image taken from a game external to Roblox but which shows the function I’m talking about:

As you can see in the image, the enemies in the game emit a light that represents their field of vision, and depending on what is in the environment, it can be seen obscured or intersected depending on the walls or objects in front of them.

So I want to know the following things:

1.is this possible in roblox?
2.How difficult would it be?
3. What type of mathematical areas would be required to know?
4.and finally if there is any script module that helps add and manage this type of things