A gas having higher critical temperature can be liquefied easily. Thus, the intermolecular attraction in a gas having higher critical temperature is stronger. Here, carbon dioxide has higher critical temperature than methane (31.1°C > -81.9°C). So, carbon dioxide has stronger intermolecular forces than methane. Therefore, it softens on heating and melts over a range of temperature.