If a throttle position sensor (tps) is bad but engine idles, could it knock once fixed?

my car would idle ok but once you press the gas it would die. After having it diagnosed i was told the throttle position sensor was bad, but the mechanic was able to adjust it long enough for it to work but said the engine was knocking very bad when he did that. I can still start the car and it will idle without... show more my car would idle ok but once you press the gas it would die. After having it diagnosed i was told the throttle position sensor was bad, but the mechanic was able to adjust it long enough for it to work but said the engine was knocking very bad when he did that. I can still start the car and it will idle without any knocking until you give it gas it dies. could this be true? or where they just trying to sell me an engine? im thinking of buying the tps since there only around 50 bucks and get it put on, just to see if it fixs it.
Update: UPDATE>>>>>>>>>> im think the tps is bad the real problem though because it was diagnosed by a dealership after taking it to other places that couldnt figure it out and the dealership tested it and stuff so i belive them that its the tps i just dont belive the engine is bad because the... show more UPDATE>>>>>>>>>> im think the tps is bad the real problem though because it was diagnosed by a dealership after taking it to other places that couldnt figure it out and the dealership tested it and stuff so i belive them that its the tps i just dont belive the engine is bad because the car was driven once since its been like this. and it will still drive on its own power when its in drive just cant give it gas thanks to all who have answer so far!!!!
4 answers 4