[Solved] Assign an Instantiated object to a parent

Hi all! Still very new to development, but I’m in need of some guidance. I am looking to take a randomly drawn card, and add it to an existing parent (a plane on my UI). However, I’m unsure how to assign the new card to a specific parent. I copied the code from a tutorial, but I want to change it up a bit slightly. I’m trying to add the card to the “Hand” parent.

Can somebody help walk me through this? Below is the code, and I have attached a screenshot of my editor:

	void MoveDealtCard()
	{
		GameObject newCard = DealCard();
		// check card is null or not
		if (newCard == null) {
			Debug.Log("Out of Cards");
			showReset = true;
			return;
		}
		
		//newCard.transform.position = Vector3.zero;

		newCard.transform.position = new Vector3((float)cardsDealt / 4, (float)cardsDealt / -4, (float)cardsDealt / -4); // place card 1/4 up on all axis from last
		hand.Add(newCard); // add card to hand
		cardsDealt ++;
	}

newCard.transform.SetParent(handTransform);

handTransform in this context is the transform of the Hand GameObject. You could use Find to get this, but I suggest caching it in the script and setting it in the inspector