Script to find nearest object