how to say hello world?

Godot Version

pretty sure its godot 4

Question

so im super new to godot and I was wondering how to make something say ‘hello world!!!’, not put it in the output or whatever the lil bar at the bottom is (I already did that. pat on the back) but make a character say it in a 2d world. Ive got this polygon dude and when I click on him I want him to say hello world! can anyone help me with that? thanks!!!

Connect the input_event signal of the collision object to a handler, something like this

func _on_input_event(viewport: Node, event: InputEvent, shape_idx: int) -> void:
	if event.is_action("left_click"):
		var myLabel: Label = Label.new()
		myLabel.text = "Hi!"
		self.add_child(myLabel)
		myLabel.global_position = self.global_position