Making a turret AI. How do I target the closest player and rotate an object toward them?

Title says it all.

I’m trying to make an object point itself toward the closest player (of say, 16) on the X axis (and another child object on the Y axis) with a maximum range. I would think raycasts with an object pool would be best for this but am still new to Udon. Not sure how to figure out who’s closest and get a Vector3 or something from that.

Cheers.