Playing a scale on one string works, but it requires shifting your hand a lot. The standard way to play scales on bass uses a "box pattern" across multiple strings. Less shifting, more notes.
The two-octave C major box
Starting on the A string at the 3rd fret (C), the pattern goes:
G string: ----------- 5 - 7 - 8 (high D, E, F)
D string: 5 - 7 - 9 ----------- (A, B, C... wait that crosses over)
Better written as one move at a time. Start with your index finger on A string fret 3:
- A string, fret 3 (C, root), index finger
- A string, fret 5 (D), ring finger
- A string, fret 7 (E), pinky
- D string, fret 3 (F), index
- D string, fret 5 (G), ring
- D string, fret 7 (A), pinky
- G string, fret 4 (B), middle finger (shift up one fret)
- G string, fret 5 (C, octave), ring
- G string, fret 7 (D), pinky
- G string, fret 9 (E), shift, pinky
- G string, fret 10 (F), index of new position
- G string, fret 12 (G), ring
- G string, fret 14 (A), pinky (or shift, depending on the bass)
70 BPM. One note per beat. Up the scale, down the scale. Loop.
The whole point: this box moves
The box pattern at the 3rd fret = C major. The same box pattern at the 5th fret = D major. At the 7th fret = E major. Each fret up shifts the entire scale up a half step.
This is the #1 most important concept in bass: scales are shapes, not specific notes. Learn the shape once. Move it. You know every major scale.
Next: locking root notes to chord changes.