taking a walk down to portoroz is a nice option when in piran.
the town is just 2 kilometersd away from piran and you can walk along the sea on walking paths all the way to portoroz.
portoroz is a modern style holiday resort and does in my opinion not have the charm piran does, but if you need to do some shopping or want to go to a good beach then portoroz is a good option.
Just down the road from Piran is Portoroz which is a touristy beach town. It has a little bit more activity than Piran. There are more hotels, casinos, and when I was there a couple bands were playing at one of them. Near the beach are basketball and bocce ball courts if one is interested in some sports.