I am trying to destroy the object that the script is attached to by calling this function from another script:
function Destroythis() {
print("destroy this object");
Destroy(gameObject);
}
The console did not show any errors and it did show “destroy this object”.