If you can run hardware diagnostics (check HP’s support website). If it gives you a error code, research the error code and it could probably be the webcamera which you might have to replace.
If it runs through, check device manager for any yellow bangs (!). Uninstall. Restart. Check Device Manager again. Same issue. Uninstall. Check HP’s website for Webcam drivers and Webcam software (two different things). Install. Works, its good.
Does not, Try restore option (back up data before) or Operating System Reinstallation. Should definitely work