Cast Failed to AI Blueprint

I don’t really follow your setup, but GetPlayerPawn will return whatever pawn is controlled by your player controller - I guess your default player pawn as configured in the game mode. Presumably this is not your AI character, as that wouldn’t make much sense.

If this graph is within your player-controlled character blueprint, and you want to reduce the health of your AI character, you need to get a reference to your AI from somewhere. Casting just makes an assumption about the type you are interacting with in your blueprint, it cannot actually find a reference.