when i pause a game using UI panel and freezing time, my falling coins in the level is still showing.

when i pause a game using UI panel and freezing time, my falling coins in the level is still showing.


public void OnMouseDown() {

	 {
		paused = !paused;
	}
	if (paused) {
		PauseUI.SetActive (true);
		Time.timeScale = 0;
		gameObject.active = false;
		GameObject.Find ("Button").transform.localScale = new Vector3(0, 0, 0);

		// Show button

	}
	if (!paused) {
		PauseUI.SetActive (false);
		Time.timeScale = 1;
		GameObject.Find ("Button").transform.localScale = new Vector3(1, 1, 1);
	}
}

simple code for calling