Hello and thank you for choosing Just Answer.
Is it a constant knocking sound?
Does the car shake ?
Do you have power loss?
Did the check engine light come on?
You need to put the car on a scanner and find out why the light came on. Take the car in to a parts store and ask for an OBDII scan. They will run the scan free, which will tell you why the light came on.
Most of the time this is caused by a bad spark plug wire. The wire will slip off the plu and make a knocking noise.
I would make sure all the spark plugs wires are on good. Pull them off and put them back on. Then turn the car on (when it's dark) and open the hood, look for any blue electric arc shooting out. This would indicate that the wire is broken.
Finally, if the light is on for a misfire (the code will be P030#, last number depends on the cylinder) the it's most likely a bad wire or spark plug.
that actually migh be the problem because i just changed the spark plugs a wires myself so they might not be on good... thank you for your help
Hope that solves your problem.
That scan will be your friend. The fact that the light is on indicates that the car has already found a fault in the system and stored it in the system. Once you do the OBDII scan it will reveal what the problem is. I have a feeling that it's going to be your spark plug wires, however it could also be the knock sensor going off due to low octane fuel.