Player Character invisible to AI

In my project I have AI that patrols a set area and when the player enters their field of view, the AI will chase the player. The AI is using AI perception. I also have it when I press a key input the characters material is changed.

How do I have it so when the material is changed the AI doesn’t see the player.

You can use a simple bool variable for this. And with Decarator on Blackboard, you can control this bool.

Would I need to do anything related to the AI perception in the AI controller?