Melee Attack in SNPC !

Hi, I want to make a SNPC, I have done almost but I don’t know how to make a melee attack in my SNPC.

If enemy will get close to my SNPC it will play a “throw” sequence but it doesn’t hurt enemy, so I need it! PLease Help me!

[lua]
local attackableEnts = ents.FindInSphere(self:GetPos() + self:GetForward()*55 + self:GetUp()*45, 25)
if (attackableEnts != nil) then
for _,i in pairs(attackableEnts) do
if ( i:IsNPC() or ( i:IsPlayer() and i:Alive() ) ) and (i:GetClass() != self:GetClass()) and (i != self)) then
i:TakeDamage(self.Damage, self)
-code to apply for all
if (i:IsPlayer()) then
–code
end
end
end
timer.Create(“timercooldown”…self.Entity:EntIndex(), 0.8, 1,
function()
self:SetSchedule(SCHED_CHASE_ENEMY)
end)
end
[/lua]

Firstly, you would create a timer for this function that triggers it after some delay when you want npc to attack, then you just need to check for entities in sphere in front of the SNPC and apply damage to them