what would be the reason for my heater not working unless i press on the gas pedal?
Usually it means there’s air trapped in the cooling system.
At idle the coolant flow slows down to where if any air is trapped in the coolant it collects in the heater core and you get no heat. When you press on the accelerator the coolant flow speeds up and pushes the air out of the heater core and you get heat. To see if this is the problem try this.
Get the engine up to operating temperature. With the engine idling loosen the upper radiator hose clamp. Take a small flat bladed screwdriver and slip it between the upper radiator hose and the radiator hose neck. Allow the engine to idle until all that comes out of the upper radiator is coolant. Remove the screwdriver and retighten the upper radiator hose clamp.
What do you mean by “not working”? If you mean that the air is flowing but not being warmed when the engine is idling, then there probably isn’t enough coolant flowing through the heater core. Flushing the heater core may help.
If the air flow stops completely, a vacuum controlled blend door may be closing.
If the heater fan quits running at idle, there may be a problem with the heater fan motor. When you step on the accelerator, the voltage increases and causes the motor to run. This would be unlikely, but not beyond the realm of possibility.