Welcome to the forums [mention|xXaWhQmJRFAFrDU0OfYEbw==], for the future, it’s better to use code tags and share only the relevant piece of code.
Looking at your script, it should be working as you described it. However, your inFOV variable is set only in the Update method which is called in the play mode. If you press play to enter play mode your script should be working fine.
If you want to make it work in the edit mode as well, you could add the ExecuteInEditMode attribute to your FOV_Detection class like this:
[ExecuteInEditMode]
public class FOV_Detection : MonoBehaviour
{
// your class
}
Hope this helps!