Hi so im trying to create a game where whenever you press left click button it plays an attack animation

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Nightmare
func _input(event):
if event.is_action_pressed("my_action"):

Can you show more code? Nothing seems wrong with this.

exuin | 2021-09-05 19:17

  1. You might have not assigned the correct mouse button to the input: (“my_action”).

  2. It is case sensitive, so anything like My_action or My_Action won’t work.

  3. The 2 points up is also true for the animation name.

  4. I need some more code and the animation for more troubleshooting.

ImperialPhoenix | 2021-09-06 07:24

:bust_in_silhouette: Reply From: CassanovaWong

Not enough information… could be a number of things…

Do you get errors in the debugger? If so, could you copy/paste them here?

What node is this script attached to? What nodes are in the tree?

There are a lot of tutorials out there for this … Try a YouTube search for Godot animation tutorials.