2012 Chevrolet Malibu P0507

2012 Chevy Malibu code tps. Problem occurred when car wouldn’t turn over. Check engine light came on code P0507 came up. Throttle position sensor. I changed the throttle body and car still has trouble turning over. Please help

I don’t know where you got the explanation for the 507 code. This is what I find,

A P0507 DTC trouble code may be caused by one or more of the following: A vacuum leak. Leaking air intake after the throttle body. EGR valve leaking vacuum. A faulty positive crankcase ventilation (PCV) valve. Damaged/failed/dirty throttle body. Failed EVAP system. Failed IAC (idle air controller) or faulty IAC circuit
From:

Copyright OBD-Codes.com

A TPS code would be P012x where x depends on the failure. By “trouble turning over” you mean it won’t start at all? Or it starts only after a lot of cranking?

My dad has a diagnostic scanner. Check engine light was on and that’s the code it gave off I typed in the code and vehicle info and that’s what came up. It’s weird dude I started the car twice today no biggie. And I’m leaving my grandmas house and it turned over but it dies out.