If you’re ever in Nice, do yourself a favour and schedule yourself a day in Monaco. The bus ride alone will be worth it.
You could take the train but it will only save you maybe 15 minutes compared to the bus and you’ll miss out on some absolutely breathtaking view. I highly recommend you make the 45-minute scenic bus ride.