Keep it cool, avoid consistently touching the pudding (try to get enough serving in one take), and use a thickener in making the pudding. Just like my recipe here, I used cornstarch as a thickening agent for the vanilla pudding.