You can use more than just the root but it's not always going to be major or minor pentatonic. Use other chordal notes (usually the 3rd, 5th, octave) to make your basslines more interesting as well as chromatic notes/notes in the scale in between chord changes so they sound more fluid