If you hover your mouse over the property in the inspector it will tell you the name of the property in the script, it may be surprising, but usually it’s lowercase and underscores instead of spaces.
Hi!!! This is very easy. You can use the method get_node(NodePath node_path) and set parameter Visible or (in GDScript) visible true or false. If is true, your sprite will became visible and vice versa.
Sample code:
extends CharacterBody2D @onready var sprite = get_node(“MySprite”)
func _ready():
pass
func _physics_process(delta):
if(Input.IsActionPressed(“Left Button Mouse”)
sprite.visible = true
if(Input.IsActionPressed(“Left Button Mouse2"”)
sprite.visible = false
Actually, I don’t quite understand what you need. If my method is not suitable for your task, then please tell me more about it.