Destroy object when transform.position.x > 10.

I have a bullet prefab with a script.

void Update ()
{

    transform.Translate(5 * Time.deltaTime, 0, 0);//move bullet
	
	//check bounds
	if(transform.position.x > 10)
	{
		Destroy(this);	
	}
}

The bullet moves on the x-axis but stops moving once it hits 10. The object is still alive and the mesh is still rendered. How do I destroy the entire object?

because Destroy(this); is used to destroy the script component not the game object
u should use Destroy(gameobject); and this will fix it