Hello, I’m trying to write a respawn script but whenever it does, the lose sound isn’t playing.
if (other.gameObject.CompareTag("respawn"))
{
source.clip = losesound;
source.Play();
Application.LoadLevel(Application.loadedLevelName);
}
I also tried this, but my collectibles aren’t setting themselves to “true” and the count number doesn’t change.
if (other.gameObject.CompareTag("respawn"))
{
source.clip = losesound;
source.Play();
other.gameObject.SetActive(true);
transform.position = new Vector3(83, 11, -250);
count = 1;
}