How can I access varibles from a script with a class Weapon : ItemScriptableObjectBASE trought the Original scritable object - ItemScriptableObjectBASE

I am trying to access a scriptable object varriant of some sort so i can get variables from it, but trough the original base scriptable object. Here is my problem :

using UnityEngine;
// BASE ITEM
public class Item : ScriptableObject
{
 public string itemName;

 // The ID of every Item needs to be different in order to be saved and loaded 
 public int ID;

 // The price of an item can be used to set up a shop
 public int price;

 // If you want an item to be stackable, set this bool True
 public bool Stackable;

 // The UI icon of the item 
 public Sprite itemIcon;

 public virtual void Use()
 {
     //Use item         
 }
}

That is the Base script and Here is the “variant” :

using UnityEngine;
[CreateAssetMenu(fileName = "Weapon", menuName = "Item/Weapon")]
public class Weapon : Item
{
public weaponType type;
public int weaponDamage;
public Sprite ActualItem;

public override void Use()
{
    base.Use();

    //Equip Action

}

public enum weaponType { Sword, Axe, Spear}
}

And I am trying to get the variable “weapondamage” from another script using the Base Sciptable object - Item as a reference

Item item;
Weapon weapon2;

void Update()
{
      item.weapondamage = weapon.weapondamage
}

But It Doesn’t work
Pls some help

Thanks for the help. I’ve did this and I’ve changed ‘weapon2.damage’ with another int veriable - attackdamage and now it works like a charm. That was for an inventory system BTW. Here is a part of it:

public int attackDamage = 4;
public InventorySlot slot;
Item item;

void Update()
{
      item = slot.itemToAccess;

      if (item is Weapon)
      {
            var weapon = (Weapon)item;           
            attackDamage = weapon.weaponDamage;
       }
}

Thanks again.