Trigger mouse problem

scene 1
if Input.is_action_just_pressed(“left click”):
if button_press == false:
action()

scene 2
func _on_slot_1_item_button_pressed():
print(player.button_press)
player.button_press = !player.button_press
print(player.button_press)

i already connect signal, from different scene. its working but i want to trigger mouse just if i pressed it true and then its comeback to false. i tried to fix it with change to false after true in func. its not working anyone have basic guide?

If you are not a native english speaker it is ok to post your question in your own language with a translation next to it. From what you wrote I have no clue what you are asking or what the problem could be.
Also, you should provide more details like how your node tree is set up and what signals you have connected.

i am so sorry. I’m still practicing my English at the moment.


i upload my script i tried to trigger the mouse when i click. i connect signal “pressed” when my button was press to hotbar and connect var boolean button_press

What is the intention of this? What do you want to happen? Explain what the correct thing that should happen is, please.

I want to clicked on hotbar but not play animation because I set left click is to play animation so when I click on hotbar it’s should just swop equipitem not play animation