How do you remove sprite's material via script?

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

If I set a sprite’s material like so…

const GRAYSHADER = preload("res://common/shaders/grayscale.shader")
var gray = ShaderMaterial.new()

func boring_sprite():
    gray.set_shader(GRAYSHADER)
    $Sprite.set_material(gray)

…how do I, at a later point in the script, remove this material from the sprite?
Thank you!

:bust_in_silhouette: Reply From: Sween123
SPRITE.set_material(null)