When creating an Animation Node Function on different node types, for example a state machine, you must use the function convert nodes (blue) to properly convert the node to a Sequence Player or Evaluator.