Make pawn see each oder in my RTS

Hello the community, I am new on UE and currently using UE4.27. i am working on an rts and tried to make an instance of BP_Hero print " stop evil " when it see an instance of my class BP_Foe by using the function on see pawn. But i don’t know why it doesn’t work as if there where nothing in front of it but when i set BP_Foe as Default pawn in the Game mode it can see it. Can anyone help me?