1. I create the object.
    Code:
    player.gameObject.AddComponent<become>();
    And in my object i spawn an item in fount of me.. but when i do.
    Code:
    var playeritem = player.GetComponent<become>();
    GameObject.Destroy(playeritem);
    Its not destroying the object i spawned in. with item = GameManager.server.CreateEntity(prefab);

    What am i missing
     
  2. Wulf

    Wulf Community Admin

    BaseEntity.Kill() is generally what you'd use. So with your wording, item.Kill(), though it's actually an entity, not an item.
     
  3. is there a way to pull the item to use else where in the script to kill it.
     
  4. Wulf

    Wulf Community Admin

    I'm not sure what you're asking by "pull".
     
  5. can i message you this code and you can kind of see what im looking at.
     
  6. delete.
     
    Last edited by a moderator: May 13, 2018