Pathfinding on multiple targets

Hi all

So I’m working on an online game where the enemy pathfinding function won’t allow me to sett multiple targets using the FindGameObjectsWithTags as I can’t put .transform after the tag

NOTE: Pathfinding is all done by me I’m not using anything like Rain AI (mainly due to me not knowing how to use it)

How do I give it multiple targets? Or should I make a list where I keep all the players positions and make the enemy choose the closest one to them

Thanks in Advance

make a list where I keep all the players positions and make the enemy choose the closest one to them

You have to define each step for the computer. It cant make decisions on its own unless you program that knowledge into it.