It may be playing with ya ,but sometimes it is telling you it does not like what your doing with it. Like holding it wrong or touching a sore spot. If the cat normally is a playful one I would say it is just trying to get the ball rolling so to speak.
I have always found that when a cat swats at me or hits me that it is playing with me.
I think your cat is playing with you. Or maybe jealous. Is there a new cat in the house?
I agree it is either playing with you or it wants you to leave it alone.
Your cat is seeking interaction, love and attention. Ashes does it all the time, he wants to get petted and show love.