If you have a reference to the node, then you can change the visible property like this: SpriteNodeHere.visible = true
to make it visible, and SpriteNodeHere.visible = false
to make it invisible.
Edit: I should add, if the script is attached to the Sprite you want to make visible or invisible, then you can just use visible = true
and visible = false
.