I have a sound for a car and I am using this script
public AudioSource carsound;
public float pitch;
Private bool play;
void Update ()
{
pitch = speed/currentspeed;
carsound.pitch = pitch;
If(play)
{
carsound.Play();
play = false;
}
}
`
It plays my sound once my car start but after few seconds my sound stops playing
Can anyone solve this ? ;_;