void Update() { //Slide down transform.localPosition = new Vector3(0, transform.localPosition.y + speed * Time.deltaTime, 0); //Destroy when out of screen if (transform.position.y > 7f) { //If the slot is not empty, put the action back in the deck if (linkedAction.transform.parent != null) { linkedAction.AddSelfToDeck(); } Destroy(gameObject); } }