Zombie weapon SWEP

I am creating zombie SWEP and I have a few things I need help with.

  1. I want it so that the right click makes zombie sounds, but I want it to be delayed how do I do that? I have tried to do SWEP.Secondary.Delay = 6 but that doesn’t work.

Here is the function I have running I maybe I need to edit something?

( by delay I mean I want it so that there is a time limit with each zombie scream)

function SWEP:SecondaryAttack()
self.Owner:SetAnimation(PLAYER_SUPERJUMP)
self.Owner:EmitSound(“npc/zombie/zombie_voice_idle”…math.random(1, 14)…".wav")
self.NextYell = CurTime() + 10
end

  1. I would like to know how to make it attack for some reason I couldn’t get it to attack and it there is no animation, I would like to have a quick and easy code for it if you can please?

This vaguely looks like very old ZS code. You can look at ZS’ weapon_zs_zombie swep, most of the stuff for it self-contained.

You need to add a check to the start of your secondary attack like so:
if CurTime() < self.NextYell then return end

Why don’t you base nextyell around NextSecondaryFire?