Hello I’ve created a script that’s supposed to play a sound when something collides(preferably the Player) with the Ground GameObject of mine. So it’s pretty much a walking sound. Anyways it doesn’t work at all. After testing some more right at this second I also realized that the sound doesn’t play even when I get rid of the script and just keep the Audio Source. The sounds only appear to work when I use it on my Player, which is not good because the script and Audio Source is supposed to be on my Ground GameObject, not Player. Here’s my script:
public AudioClip Sound;
void OnTriggerEnter2D (){
audio.PlayOneShot(Sound);
}
}
If anyone has any suggestions on how to do the walking sound a better way, please let me know. I’ve already tried Animation Events, but it didn’t turn out well.
Why can’t I add more than one tag? Oh well.