In addition to @Sononeo’s reply, you must start your MetaSound before you can use the Set Parameter functions. Have a look at my setup in this post, and see if that helps: Setting Metasounds Variable - #48 by ebuch
In that setup, I’m playing a MetaSound and using the handle to the audio component to change the inputs once the sound is active. I’m using Quartz in that setup, but you can just use the regular Play function.