Car
Although Montenegro's buses have good service along the coast and can get you to most points in the country, renting a car gives you much more flexibility and makes life easier, especially when visiting the mountains.
Since the Old Town is compact and pedestrian-friendly, you do not need to rent a car in Kotor. It's easy to reach nearby Perast by bus or taxi.