You hold your hand steady and don't try to touch them, let them touch you. If they are moving then they will realize it was their motion that caused them being bopped on the head, if they are being still and they get bopped then they are going to think they're under attack or things are falling on them. But if you hold it steady they will probably hit their head a few times and then finally get clear of the hand and then they may move on to it.