5 meters in what direction? If there is no direction associated with that value, whether it be by the simple up, down, left, right, or a combination of horizontal and vertical to make a diagonal, then it is a scalar.
In order to make the value a vector, a vector needs some direction it has to go. It could be: "5m North", "3m east, 4m north", or "5m at 24 degrees above the x-axis". Note that some vectors don't stick to a up-down only or left-right only orientation and stay in one dimension. They are usually in two, sometimes three, dimensions.
But for a two dimensional vector making a diagonal, there has to be a perfect horizontal component and a perfect vertical component to form a right triangle. The vector can be solves for a scalar value through trig or through distance formula.