Before you start the game make sure the object (It doesn't have to be initially created or on the layout) is under the family you want it to be. If you create any object using code, it should be under that family. In my image, kerosene and items are not on the layout itself yet when I create them using System or Spawn from object, they are still under the family. If your issue persists, the issue is not assignment from object to family but rather a condition that picks your object by itself.