I have recently built a custom PC, but when I try to turn it on, it instantly turns off. If I unplug the 8pin cpu cable from the motherboard, everything turns on and stays on, but my cpu isn't getting power. I have tried everything including getting a new power supply and motherboard. I took out my ram and cpu and put them back testing one stick of ram at a time. I decided to take everything out and built the pc out of the case. I left everything in the motherboard, so the only things plugged in are my cpu, ram, m.2 ssd, and liquid cooler. I don't think the cpu is the problem because I swapped it out with my friends old one and the same problem happened. When I turn the power on, either plugging in the power button in on the case or using the screwdriver on the pins, it immediately turns off. The fans and everything spin while it is briefly on. The cpu light on my motherboard also turns on while the system is on which indicates that it is the problem. Both the 24 pin and 8 pin motherboard and cpu connectors are connected.
Spec list
CPU: i7 7700k
MB: Z370-E
Ram: G.skill trident rgb 4x8
Cooler: corsair h100iv2
Power supply: corsair hx750i
ssd: samsung 960 m.2 512gb pro
Spec list
CPU: i7 7700k
MB: Z370-E
Ram: G.skill trident rgb 4x8
Cooler: corsair h100iv2
Power supply: corsair hx750i
ssd: samsung 960 m.2 512gb pro