The point here is what I created the animation, set the animation to the letter e, made the speed and the animation is on the first frame.
Here is the code:
if(keyboard_check_pressed(ord("E"))) { image_index = player_sprite_attack; image_speed = 1; var damage_object = instance_create_depth(x - 0.65, y + 12, 0, object_damage); damage_object.creator = id; }