Side scroller platformer - cinematics

I’m just trying to make a cube moving right <-> left or up <-> down.