void playSound() { if (!hasPlayed) { gameObject.GetComponent<AudioSource>().PlayOneShot(leverSound, 1.0f); hasPlayed = true; } }