SOLVED Need help with Delaying Projectiles when Character Shoots.

I been trying to work on how my character will shoot projectiles and have some sort of delay in-between them. I have this code but what's its doing is that it fires one shoot and it doesn't fire anymore. What I am trying to go for is having the player shoot 3-5 projectiles at a time and have a slight pause.

Create Event

Code:
//Shooting
canShoot = true;
shoot_delay = 1

Step Event

GML:
if keyboard_check_pressed(ord("W")) && canShoot
{
    canShoot = false
    alarm[0] = shoot_delay
    with(instance_create_layer(x,y,"BULLETS", obj_projectile))
    {
    direction = 90
    speed = 10
    }
}
 
Top