Scripting a rocket to destroy/damage npc_helicopter

Hello,

Inexperienced code monkey here, working on a simple rocket launcher SWEP and I have run into a small issue.
The rockets themselves are unable to damage the hunter chopper (npc_helicopter).

The rockets do Util.BlastDamage currently but I have tried utilizing env_explosion as well as DMG_AIRBOAT with damageinfo, all with no avail.

The last workaround I tried was counting on the collision between the rocket and the chopper to execute the self destruct function, but half of the time the rocket collides with [phys_bone_follower] attached to the chopper, so I know that cannot work.

Clearly I am doing something wrong but I have not been able to pinpoint it yet.

Any ideas?

Here’s the current code for the rocket.

AddCSLuaFile()

ENT.Type = “anim”
ENT.Base = “base_gmodentity”

ENT.Spawnable = false

[Lua]

if SERVER then
function ENT:Initialize()
self:SetModel(“models/props_junk/PopCan01a.mdl”)
self:SetSkin(1)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
self:PhysicsInit(SOLID_VPHYSICS)

	local phys = self:GetPhysicsObject()

	if IsValid(phys) then 
		phys:Wake()
	end 
end



function ENT:Explode()
	local ply = self:GetOwner()
	if !IsValid(ply) then ply = self end 

	local effdata = EffectData()
	effdata:SetOrigin(self:GetPos())
	util.Effect("WaterSurfaceExplosion", effdata)

	self:EmitSound("weapons/explode"..math.Rand(1,2).."wav", 500,75,1,CHAN_AUTO)
	util.ScreenShake(self:GetPos(), 5, 5, 1, 1000)
	util.BlastDamage(self, ply, self:GetPos(), 300, math.Rand(90,150))


	self:Remove()
end

function ENT:PhysicsCollide(data,phys)
	self:Explode()
end 

end

function ENT:Think()
	if CLIENT then 
		local emitter = ParticleEmitter(self.Entity:GetPos())
		local part = emitter:Add("effects/bubble", self.Entity:GetPos())

		if part then 
			part:SetDieTime(1)

			part:SetStartAlpha(255)
			part:SetEndAlpha(0)

			part:SetStartSize(5)
			part:SetEndSize(0)

			part:SetGravity(Vector(0,0,-100))
			part:SetVelocity( VectorRand() * 50)

		end

		emitter:Finish()
	end

	local phys = self:GetPhysicsObject()
	if IsValid(phys) then 
		phys:IsGravityEnabled(false)
		phys:ApplyForceCenter(self:GetUp() * 1200)
	end 

end

function ENT:Draw()
	self:DrawModel()
end

[/lua]

(Still haven’t figured how to properly paste code in here, any ideas what I’m doing wrong here too?)