- Home /
Jumping sound not working after respawning
I have a jumping script attached to a player. It works until i die and respawn. Any help? i am using javascript
#pragma strict
function Update () {
if(Input.GetKeyUp("space")) {
if(!audio.isPlaying) {
audio.Play();
}
}
}
Comment
The code you wrote is correct. How do you manage death and respawn ?
Answer by joelfivat · Jan 23, 2014 at 12:21 PM
Input.GetKeyUp ? Don't you want to use Input.GetKeyDown instead ?