it gives this error

Invalid assignment of property or key 'visible' with value of type 'bool' on a base object of type 'Sprite3D'

here is the code



@export var sprite3d = Sprite3D

func _process(_delta: float) -> void:
	if Input.is_action_pressed("mouser"):
		sprite3d.visible = true
	else:
		sprite3d.visible = false```

Maybe change
@export var sprite3d = Sprite3D
to
@export var sprite3d: Sprite3D
?

    Isaac no still crahes with error Invalid assignment of property or key 'visible' with value of type 'bool' on a base object of type 'Nil'.

    @export var sprite3d = $/root/path/to/nodetree/sprite3D?

    or/and

    @onready var sprite3d = $/root/path/to/nodetree/sprite3D?