all you need to do in this case is to cast the widget to the first person ui class. basically the set health percentage only exists in the first person ui class so you just need to use the cast to make sure the widget is of that class, or put another way identify the widgets class.