roman fighting style was completely different from phalanx:
they used their throwing spears to throw at the enemy but than they took their sword and used it to fight while behind the cover of their shield.
the romans made formations so when a guy on the front line fell, the person behind him could jump in and continue the fighting. their fighting style consisted out of staying low in the cover of your shield and hacking towards the enemies feet/body.
also, the front line and the last line of their formations were always the veteran fighters who werent scared to charge into the enemy and the backline could make sure the newbies didnt run away.