Why does the NPC keeps sinking when moving?

Well I am doing a simple game which consists of multiple NPCs , each npc has a Character controller attached on it with NO rigidbody.
the NPC has an AI script attached to it so when it sees my main character it starts following it then hitting it.
When the NPC starts moving he slowly keeps sinking through the terrain.

In the AI script , when am in the range of the enemy it calls this function :

function lookAt (trg : Vector3)


var rotation = Quaternion.LookRotation(trg - transform.position);

transform.rotation = Quaternion.Slerp(transform.rotation, rotation, Time.deltaTime * damping);



it calls the moveto() function that actually moves the NPC

function moveto()


transform.Translate(Vector3.forward * moveSpeed *Time.deltaTime);



I am suspecting that the issue is with the moveto function , thanks in advance … am sorry if I missed anything , its my first post here

I assume you have some sort of collider on the NPC, makes sure the bottom of your character is not outside the collider because if it is, the NPC will sink until the collider hits the terrain