public void Audio (){
music.volume = volumesliders[0].value;
sfx[0 - sfx.Length-1].volume = volumesliders[1].value; //NOT FINISHED YET!!!
}
Note: The sign in the square braces is a hyphen. So this is a simple script to control the volume of several audio sources through one slider. When I build the script, I get no errors, but once I try to move the slider in-game, I get an ‘out of range index’ error. What am I doing wrong?
nvm, figured it out