There can be many reasons why your pudding doesn’t set- the amount of thickening agent you have used (in this case, cornflour) may not be enough, or you might not have given it enough time to cook.  Whisking the pudding mixture too hard can also cause it to become runny and not set well. Keep all these points in mind to make sure you end up with a pudding mixture that has the perfect consistency.