Top-Down Raycasting

I’m trying to figure out how to do top-down ray casting, basically what Im trying to do is have the enemy start following or shoot at a NPC or Player when they are close enough to them or seen by them or something like that, Im not really good at variables and raycasting stuff so I’d really appreciate the help!

use this condition

Yeah I already figured it out yesterday but thanks