Hi Gina, I'm a regular Vespa rider in Barcelona.... DO FOLLOW Frank's advice.... don't even think about renting a scooter unless (a) you have some experience riding it and, most critically (b) you're happy with riding on crammed streets.
At times, traffic in Barcelona can be unnerving to many especially if you're not accustomed to the "closeness" we drive in the cities here in Europe. The safety distance between vehicles, front and back but also sideways, is normally smaller than that in the US and I've had friends riding with me that felt uncomfortable because they thought we ride "to close to each other". One reason being of course because cities are more densely built than in the US. This of course doesn't apply to riding outside the city, on roads we keep the same safety distance than anywhere else.
I have to say that drivers in Barcelona are not found to be particularly bad compared to other cities. Traffic is quite civilized and drivers are 'relatively' respectful to each other.... however, when driving too close to each other accidents happen. From a little over 17000 traffic related accidents in the city (2015), only one-third involved motorcycles but from the total toll of 31 dead in those city accidents, 17 were motorcycle drivers (or passengers).
It might sound dangerous, doesn't it?... well, it's not really, but it's not a walk in the park either. So if you decide to rent a Vespa at least you know :)) On the other hand, riding on a scooter in the city is really a very thrilling and pleasant experience -that's why many of us do. Btw, if you decide to do so, it's best to ride on a Sunday as traffic is very light. The worst time is 8-11ish and 5-8ish on week days and on rainy days.
Enjoy!
PS. All of the above doesn't apply if you're a New Yorker.... then you already know this stuff, LOL!!!!