Changing Variable to transform.position of object with name: RoomCam1

I use this Code:
using UnityEngine;

public class LocateRoomInput : MonoBehaviour
{

    // Start is called before the first frame update
    private void OnCollisionEnter(Collision col)
    {
        if (col.gameObject.name == "Room 1")
        {
            Camera.main.GetComponent<FollowCam> mainTarget = GameObject.FindObjectOfType<RoomCam1>.transform.position.;
        }
    }
}

to check if the player is colliding with Room1and if it is it should change the variable to the Transform of RoomCam1. please help

I think it has something to do with “FindObjects” so plural but is there a way to target a specific game object even more specific?
also, it does not like me using Camera.main for some reason…

Try Camera.main.GetComponent<FollowCam>().mainTarget = GameObject.FindObjectOfType<RoomCam1>().transform.position.;. GetComponent is a function and must include parentheses