Ahh i see what you mean - regular doors and and level doors have a DIFFERENT type of script!
This should help you:
void OnStart()
{
AddUseItemCallback("", "KEYNAME", "LEVELDOOR", "KeyOnDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("LEVELDOOR", false);
PlaySoundAtEntity("", "unlock_door", "LEVELDOOR", 0, false);
RemoveItem("KEYNAME");
}
KEYNAME - name of your key, of course. To avoid any problems name your key without any numbers -
'Name' section and "CustomSubItemTypeName" section should also be named the same - can be different but i prefer same (its easier)
LEVELDOOR - obviously name of your door. the door does not need "CustomSubItemTypeName" as far as I know.