Issue With Sliding Character During Attack. Help Please!

sorry for not being thorough enough with that there. this is the attack script: attackkey = argument0 damage = argument1 vknockback = argument2 hknockback = argument3 attack_sprite = argument4 beginframe = argument5 endframe = argument6 hitbox = argument7 xposition = argument8 yposition= argument9 imagespeed = argument10

//Animate set imagespeed if action != true { if (argument0) { attack = 1 action = true; sprite_index = argument4; image_speed = argument10
} }

//Prevent Sliding if attack != 0 { hsp = 0; }

//create hitbox if sprite_index = argument4 and image_index >= argument5 && image_index < argument6 and attack = 1 { instance_create(argument8,argument9,argument7); attack = 0 }

//Set Damage and knockback with argument7 { damage = argument1 vknockback = argument2 hknockback = argument3 }

//Destroy hitbox if image_index >= argument6 { with argument7 { instance_destroy(); } } if image_index >= image_number - 1 { action = false; sprite_index = spr_idle_right; }

probably not all of that is relevant, but just in case. I put in the variable "attack" to check if an attack is taking place, and if it is vsp is set to 0 which prevented the character from sliding during the attack animation for the most part but not perfectly. For now I've been setting things up a little differently to work with it, but I would like to know what's causing this glitch still.

/r/gamemaker Thread Parent