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

**URL:** https://qa.fmod.com/t/having-trouble-changing-global-footstep-parameter-on-raycast-to-check-gameobject-tag/16468
**Category:** Unity
**Tags:** unity
**Created:** [November 24, 2020, 8:04pm UTC](https://qa.fmod.com/t/having-trouble-changing-global-footstep-parameter-on-raycast-to-check-gameobject-tag/16468 "2020-11-24T20:04:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![SwykaMedia](https://avatars.discourse-cdn.com/v4/letter/s/a8b319/32.png) [@SwykaMedia](https://qa.fmod.com/u/SwykaMedia)
#### Post date: [November 24, 2020, 8:04pm UTC](https://qa.fmod.com/t/having-trouble-changing-global-footstep-parameter-on-raycast-to-check-gameobject-tag/16468/1 "2020-11-24T20:04:19Z")

</div>

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.

Thanks!

[Pastie](http://pastie.org/p/65TJP2AifvCYwIv0LKYeda)

---

<div class="post-metadata">

### Author: ![SwykaMedia](https://avatars.discourse-cdn.com/v4/letter/s/a8b319/32.png) [@SwykaMedia](https://qa.fmod.com/u/SwykaMedia)
#### Post date: [November 24, 2020, 8:45pm UTC](https://qa.fmod.com/t/having-trouble-changing-global-footstep-parameter-on-raycast-to-check-gameobject-tag/16468/2 "2020-11-24T20:45:15Z")

</div>

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);
