Is there a way I can run the Destroy(gameObject) after the game has run everything before it? because I always get errors or PlaySound(0); doesn’t actually play because the gameObject is destroyed instantly and if I use Destroy(gameObject, 1) it takes too long to destroy it
if (collision2D.transform.name == "BlueWall")
{
ScoreSystem scoreSystem = GetComponent<ScoreSystem>();
scoreSystem.IncreaseScore();
PlaySound(0);
Destroy(gameObject);
}