- Home /
Question by
TvattSvampen · Jul 23, 2018 at 04:52 PM ·
soundgunsound effectsgun scriptaudio.play
Im trying to make a gun shoot sound
Hey guys, im trying to make a gun sound script but when i play it it comes after ive shoot! and the sound becomes really weird
public AudioSource ak47sound;
if (Input.GetButtonUp("Fire1"))
{
ak47sound.Play();
print("RATATATATATA");
}
Comment
you're playing the sound in GetButtonUp, not Down. but why don't play the sound where you're shooting?
Best Answer
Answer by Liaram · Jul 23, 2018 at 05:38 PM
Change it to "Input.GetButtonDown" instead of up. And then add "if (ak47sound.isPlaying == false)" before you "ak47sound.Play();"
Your answer
Follow this Question
Related Questions
PlaySound Once After Activated 1 Answer
How do I make enemies play a sound when they die? 1 Answer
How to add sound to gun shot script 4 Answers
Microphone to Gameplay mechanics 1 Answer
3D sound too low 1 Answer