-
Select your animatedsprite2d node.
-
on the side panel (the inspector) you can see all the properties of the node.
-
click the “Node” tab at the top.
-
Select this signal, and connect it to your desired script.
-
it will appear as a function and you can replace what happens in there.
Hope this helps