Need help making a sentry turret

Hi, I’ve been trying to make a sentry turret that will automatically track to an object that it can see (in all directions), but I have had no luck. The sentry is simple: an object for the top part which is no collision and holds the logic bricks, and an object for the stand which is a rigid body with box collision bounds. What would be the easiest way to achieve this?

Thanks