Rendering Custom Depth Pass on AI Character Upon Player Pickup Actor

I set Render Custom Depth Pass on my AI character with a material so that he would render through walls. I am wanting to set it up so that when the player interacts with an certain object it will trigger the render custom depth pass to show the player the positon of the AI Character. As of right now it shows immediately when the game starts.
Help! lol. I am also doing this in just blueprints because of my lack of C++ knowledge.

Any time you need to change a material during runtime or especially a material parameter, that’s when you need to have created a Material Dynamic Instance. I am not sure but maybe this is your problem.