Friday Night Funkin error

Uncaught TypeError: Cannot set properties of null (setting ‘volume’)

if you look at the full error message (that you didn’t show us) you will find a filename and a line number where your error occurred. go to that file and line number and then search for anything that looks like Something.prop or Something.SomeOtherThing.prop. it might also look more complicated like SomeArray[0].prop, etc.
either way there is a . involved. whatever is to the left side of your . does not exist at runtime (e.g. Something, SomeOtherThing or SomeArray, etc.). meaning it has no value / is uninitialised / is null. if you have more than one . in your error line, then either one or all of them could be null, but at least one is.

how to fix: make the “thing” that is null be not null. in your example you want to change volume so you need your “thing” to be set to something that has a volume property and make it exist / live long enough to be valid everytime you are trying to change volume.

note: this is not a FNF support forum, so make sure that any future questions don’t involve in-depth knowledge of FNF source code (you are probably more knowledgeable about FNF sources than anyone around here is).