I'm fairly new to Godot and have been having problems with signals. I am trying to create an extremely simple interaction system where if the player character is in the Area 2D of the object it is trying to interact with, a label for the action key will show up, letting the player know that the object could be interacted with. I've been trying for hours to make this work but just can't figure it out. At this point I'm getting 2 errors, with one (Invalid set index 'visible' (on base: 'null instance') with value of type 'bool') and the other being (E 0:00:00:0783 InteractUi.gd:4 @ _ready(): Node not found: "InputUi" (relative to "/root/Chapter 1/terminal 1/Sprite2D/Area2D"). Even without including the UI part, the signals themselves simply don't work. here is my code.
`extends Area2D
@onready var InputUi = $InputUi
func _ready() -> void:
connect("body_entered", EnterCheck)
connect("body_exited", ExitCheck)
InputUi.visible = false
func EnterCheck(body) -> void:
InputUi.visible = true
print("on")
func ExitCheck(body) -> void:
InputUi.visible = false
print("off")`