Hello everyone. Godot beginner here. So I try to make a 2D game and I have a dice that waits until player moves his mouse inside the dice collision and then right click to roll the dice. I use an Area2D node and the signal _on_area_2d_mouse_entered to know when the mouse is inside the dice, although I can't find a way to get input inside the signal so the player can right click and roll the dice.
# Mouse Entered Dice
func _on_area_2d_mouse_entered():
print("Dice Texture : ", $Sprite2D.get_texture())
if Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
var rng = RandomNumberGenerator.new()
var dice_choice = rng.randi_range(1, 6)
var dice_path = "res://sprites/dice/dice_" + str(dice_choice) + ".png"
$Sprite2D.texture = load(dice_path)