Lua/Scripting help

This is my first time lua coding, and ive brushed up on it but I cant seem to solve this problem.
Im trying to code an antlion npc which is a remake of the glowing antlions from early Hl2 ep2 trailers. Its skin is a reskin of the normal antlion skin (I know this isent the issue). So im using an antlion worker as a base npc, and It wont follow me to attack me (It will fly at me and npcs when I first spawn it, and a while after but not often) and it just sits there moving its head the exact same way (Im assuming this is the base npc, antlion worker, trying to use its spit attack) but when I go near it will melee attack me like a normal antlion would, but move back after 3-4 hits. So basicly im asking how do I get it to stop trying to use its spit attack, and get it to follow me and other npc’s. Here’s the current code:

AddCSLuaFile( “cl_init.lua” ) // Make sure clientside
AddCSLuaFile( “shared.lua” ) // and shared scripts are sent.

include(‘shared.lua’)

local schdChase = ai_schedule.New( “AIFighter Chase” ) //creates the schedule used for this npc

EDIT: Im sorry, this isent the right forum, I thought i had hit subforums. And it wont let me change the above for some reason, maybe slow internet, please delete!

// Run away randomly (first objective in task)
schdChase:EngTask( "TASK_GET_PATH_TO_RANDOM_NODE", 	128 )
schdChase:EngTask( "TASK_RUN_PATH", 				0 )
schdChase:EngTask( "TASK_WAIT_FOR_MOVEMENT", 	0 )
schdChase:AddTask( "PlaySequence", 				{ Name = "rumble1", Speed = 1 } )

// Find an enemy and run to it (second objectives in task)
schdChase:AddTask( "FindEnemy", 		{ Class = "player", Radius = 2000 } )
schdChase:EngTask( "TASK_GET_PATH_TO_RANGE_ENEMY_LKP_LOS", 	0 )
schdChase:EngTask( "TASK_RUN_PATH", 				0 )
schdChase:EngTask( "TASK_SCRIPT_RUN_TO_TARGET",			0 )
schdChase:EngTask( "TASK_WAIT_FOR_MOVEMENT", 	0 )

// Attack it (third objective in task)
schdChase:EngTask( "TASK_STOP_MOVING", 			0 )
schdChase:EngTask( "TASK_FACE_ENEMY", 			0 )
schdChase:EngTask( "TASK_ANNOUNCE_ATTACK", 		0 )
schdChase:EngTask( "TASK_MELEE_ATTACK1", 		0 )

//schedule is looped till you give it a different schedule

function ENT:SpawnFunction( ply, tr )

if ( !tr.Hit ) then return end

local SpawnPos = tr.HitPos + tr.HitNormal * 30
local ent = ents.Create( "npc_antlion_cave" ) -- name of the folder
ent:SetPos( SpawnPos )
ent:Spawn()
return ent

end

function ENT:Initialize()
self.Entity:SetModel(“models/blackout.mdl”)
self.ent = ents.Create( “npc_antlion_worker” ) – this a npc which use a antlion_worker npc as a base
self.ent:SetModel(“models/antlio3.mdl”)
self.ent:SetPos( self:GetPos() )
self.ent:SetAngles( self:GetAngles() )
self.ent:Spawn()
self.ent:SetModel(“models/antlio3.mdl”) – the is the model of the npc ragdoll

end

function ENT:OnRemove()
self.ent:Remove()
end


(User was banned for this post ("Wrong forum" - Overv))