Instantiate prefab as Child to remove and re-do later

Ok I have been at this problem for ages, and everywhere I find is saying the same:

GameObject theRoom;

//code

theRoom = Instantiate(Resources.Load("MyPrefab")) as GameObject;

//set as child
theRoom.transform.parent = transform;

Even though everywhere suggests it; I get the following Error:

Assets/Standard Assets/Scripts/MY Scripts/RoomManager.cs(22,33):
error CS0119: Expression denotes a type', where a variable’, value' or method group’ was expected

If I remove the “as GameObject” part and just assign the Instantiate(…) to the variable, the I get the following Error:

Assets/Standard Assets/Scripts/MY Scripts/Room.cs(35,17): error CS0266:
Cannot implicitly convert type UnityEngine.Object' to UnityEngine.Transform’. An explicit conversion exists (are you missing a cast?)

Transform if the variable is a Transform, and same error if I replace it as a GameObject.

The Idea of the program, is in a editor like setup, the player calls a method on room manager, which depending on the players position access the Room in it’s array (which have pos and model) and on this would call the method to destroy the old child, and add a new one; effectively changing the room.

Here is some code:

using UnityEngine;
using System.Collections;

public class Room : MonoBehaviour {
	
	private GameObject roomObj;
	
	private int posX = 0, posY = 0, posZ = 0;
	
	Vector3 pos;
	
	private GameObject theRoom;
	
	
	
	public Room(GameObject rO, int x, int y, int z){
		this.roomObj = rO;
		
		this.pos.x = x;
		this.pos.y = y;
		this.pos.z = z;
		
	}//
	
	
	
	//Use this for initialization
	void Start () {
		
		theRoom = ( Instantiate( roomObj, pos, Quaternion.identity ) )as GameObject;
		theRoom.transform.parent = transform;
		
	}//Start
	
	
	//------------------------------------------
	// Update is called once per frame
	void Update () {
	
	}//Update
	
	
	//------------------------------------------
	//
	void ChangeRoom( GameObject newRoom ){

            //destroy old child
            
            //instantiate newRoom

	}//GiveRoom
	
	
}//CLASS

Thanks for any help is welcome, annoying how any mention like this I find suggests what just isn’t working for mine.

Try doing theRoom = (GameObject)Instantiate(Resources.Load("MyPrefab"));

You have not initialised the vector.

Try

public Room(GameObject rO, int x, int y, int z){
       this.roomObj = rO;
       
       this.pos = new Vector3();
       this.pos.x = x;
       this.pos.y = y;
       this.pos.z = z;
}

or even

this.pos = new Vector3(x, y ,z);