This is actually a trick that makes it seem like the wall is playing a sound when it is pressed. It's actually a Switch sprite which is causing the sound!
In this example, I will be creating a telephone which plays the dial-tone when the action button is pressed on it. Here is my wall:
Place a Switch[ActivationSound,Channel]
on your wall and resize it so it covers the entire area that you want to play the sound when pressed. The dial-tone sound is #174. Usually Channel is assigned a unique value (unless you want the switch to open a secret door or something and play a sound).
Change the angle of the Switch so it faces the wall. It should now be invisible (if it isn't, just turn it back around, press 1
on it, then make it face the wall again).
Now when the phone is pressed against, it will play a dial-tone sound!