So I was trying to add in some sound effects, but when I tried using Audio.PlayOneShot which everyone suggested as the easiest way its making the player stay grounded and unable to jump. Here’s the bit of code I have for jump.
Oh yes I didst realize I was getting an error in the console. This is what it says,
“MissingComponentException: There is no ‘AudioSource’ attached to the “Player” game object, but a script is trying to access it. You probably need to add a AudioSource to the game object “Player”. Or your script needs to check if the component is attached before using it.”
But I do have the audiosource attatched to the script of the player.