You need to use Pawn Sensing Components Docs VidTutorial or EQS EQS Docs and Behavior Trees or simple BP logic