Hi guys im having trouble working with the Ai Behaviour trees ( im very new to UE im sorry for any stupid mistakes)

Hi guys im having trouble working with the Ai Behaviour trees ( im very new to UE im sorry for any stupid mistakes) Basically i tried making an Ai that wanders around (it works) but then i decided to add the “attack state” and it does not seem to work (mainly i think because it does not know what the TargetActor is , even if i set it correctly (i think) (i followed this tutorial Environment Query System Quick Start | Unreal Engine Documentation)