How to code for destroying an Area2D or a staticbody2D in the script of another Area2d in Godot 3.0?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Taabta

Hello, im so new to this so please tolerate me for a moment. My question is how can i code for destroying an object(Staticbody2D) in Godot 3 after a certain event (ex. left mouse click) occurs to another object? and is there a way to code for replacing the object by another object instead of coding to destroy it?

Thanks