Lens Autofocus Problem
I bought a 2nd hand sigma 17-50 lens from someone for my nikon d5300
However when I tried the lens on the camera there was just one problem.
When the lens is set to auto-focus, the display of the camera would focus rapidly between af-s and m. And also when i half press the shutter, the beep noise from focusing doesn't happen.
The manual mode of the camera works fine.
The internal focus is also not broken as the lens managed to auto focus for 5 seconds until it went back to the problem.
Also my other lens works with the camera just fine only this lens.
And I don't think it is the contact problem of the lens otherwise the camera wouldnt be able to control its aperature. And the camera doesn't say lens not found
Your lens doesn't have a motor in, nor does your camera.
The lens will only autofocus with one of the Nikons with the motor in the camera body(eg D7000 series)
The D5000 series requires a motorised lens.
AF works best with a decent amount of ambient light and a low aperture. Many Sigma lenses are prone to AF issues. A little research will confirm this. Try cleaning the contacts on both the lens and camera body. If you can't return the lens then sell it or live with MF.