Switching between different sprites on a CharacterBody2D

Godot Version

4.3

Question

I’m in the process of learning Goodot, and I currently develop a Lunar Landing game.
My character (CharacterBody2D) has 3 sprites depending on its status : a still sprite when falling, a flame sprite when the engine is on, and an astronaut sprite, when the landing is successfull.
If the landing is not sucessfull, I want to start a particle system, and hide all the sprites. Here’s the code:

func has_landed() -> void: 
	if ( successfull_landing()): 
		$astronaut.visible = true
	else:
		$SpriteExplosion.emitting = true
		$astronaut.visible = false
		$still.visible = false
		$flame.visible = false
	landed = true	
	rotate(-rotation)
	velocity = Vector2(0,0)
	game_ended.emit() 

It works… expect that the module is still visible, just has if the line $visible = false wasn’t there.
What could cause that?

i need more information about what each unique access names is, are those all Sprite2d?
Also can you open up your Remote tab while the game is running and inspect all the visible properties?

Thanks for your reply.
The debugging allowed me to realize that I was indirectly calling $still.visible = true
First time using the Godot Debugger :partying_face: