I plugged in a GTX 1050 with a riser(powered by MOLEX) i connected my monitor to it and when i try to mine the screen turns green and my PC restarts. The riser is plugged in the PCI x1 slot, I also tried it on the PCI x16 slot(i made sure that i plugged it correctly). I am pretty new at this and any help would be appreciated.
What motherboard & OS are you using? What driver version? (PSU, CPU, etc. could also be helpful.)
Is that the only card you're using? (Might seem like a stupid question, since you don't usually need a riser with a single card, but humor me.)
Am I correct in assuming that it works correctly when plugged
directly into the primary x16 slot? (The primary x16 slot is typically the one closest to the CPU. If you only have one card, this is the slot you usually want to use, although many recent motherboards can deal with you using any.) If your riser is working properly, using the riser to connect the card to the primary x16 slot should yield the same results as having the card directly in the slot (barring games or other processes that require the additional bandwidth).
There's a good chance that you just have a bad riser, so if you have others readily available, I'd try them out first.