does the player pawn inherit from the class that your casting to? considering you mentioned actor im guessing that its a basic bp actor in which case its likely that the pawn does not inherit from the actor.
it looks to me like your while issue here is about your trying to get a variable from the player so as to display it in the widget. if thats the case then all you need is a reference to the character or pawn that is the player then it needs to be identified enough so as to get the class variable. one method to do this is to get the player pawn then cast to the class that the pawn is. so if your pawn is of the class bp1206pawn then you would cast to that class. another method to get the reference you need would be to create a variable and set its type to the class your looking to target, then when you create the widget you set the variable.
also what exactly does the warning say?