I can’t see your code, so i have to guess:
My guess is that you forgot to plug the casted PlayerShip object into the “target” input of the GetHealth node.
GetPlayerPawn has a blue output node that gives you a pawn object, you plug that in the CastToPlayerShip node.
CastToPlayerShip has two output paths and a blue output node that either is NULL with output path “Cast Failed” (if cast failed due to the object not being a PlayerShip object) or the blue output node is a PlayerShip object and the output path is the top one.
You only want to continue if the cast is successful, so connect the top output path of the CastToPlayerShip to the GetHealth node. And you also need to connect the blue node from the CastToPlayerShip cast to the blue input node (the “target” node) of the GetHealth node so Blueprint knows what PlayerShip to get the Health from.
The target input node is used in many blueprint nodes to indicate what specific object you want to get values from, call functions from or set values for. If the “target” input node is left empty/without any lines going towards it, then Blueprint assumes you want to use by default the Blueprint this node is in (hence the “self” input), which would be the Widget in this case, which does not have the “GetHealth”-function, so it fails.