Casting character fails

Have you tried “get player pawn”, I don’t know what your class inherits from, it may not be the player character base class