Having trouble changing global footstep parameter on RayCast to check gameObject tag

Hi all! I’m by no means a programmer, so I’m pretty stumped. I’m trying to constantly draw a line down from the player to determine what surface they are on, and change the “Surface Index” parameter accordingly. The debug works and the console will tell me what surface I’m on, but I can’t seem to get the FMOD parameter to change.

This is the code I’ve got so far.



Just found the fix!

Turns out I needed to change the lines with “footsteps.setParameterByName(“Surface Index”, x);” to FMODUnity.RuntimeManager.StudioSystem.setParameterByName(“Surface Index”, x);