assign values via transform ?

i have box collider on a model, i also want another collder the exact same size shape and position , but position and a set Y height.

so i want a script that will get the original boxcollider , instansate a another box collider, set the shape size, but m_newboxCollider.transform = m_oldBoxCollider.transform

this does not work , whats the best way to do this through the script ?

m_newboxCollider.transform.position = m_oldBoxCollider.transform.position;
m_newboxCollider.transform.rotation = m_oldBoxCollider.transform.rotation;
m_newboxCollider.transform.localScale = m_oldBoxCollider.transform.localScale;