Item selected signal not working

Godot Version

4.5.1

Question

hi im new to this. so im currently working on a kingdom hearts wordle like game and i have this item list where i put all the keyblades, however when i select an item inside the list nothing works, it is in single select mode and the signal is conected to the main scene’s script. this is puzzling to me because i very vividly remember it working when i first made it a few days ago, and now it only works with rmb select.

func _on_item_list_item_selected(index: int) -> void:
	print("selected")
	if $ItemList.get_item_text(index)!=awnser:
		$Label.text="wrong"
		print("wrong")
	else:
		$Label.text="right"
		print("right")
		awnser= $ItemList.get_item_text(randi_range(0,$ItemList.item_count-1))
		$Label2.text=awnser
	$ItemList.hide()
	await get_tree().create_timer(2).timeout
	$Label.text="-"
1 Like

Is the print("selected") being printed to the console?
If not, then your signal is not connected.