I can't get Teleportation to work

public class TeleportPlayer : MonoBehaviour
{
    public Transform target;
    void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Player"))
        {
            other.GetComponent<CharacterController>().enabled=false;
            other.transform.position = target.position;
            other.GetComponent<CharacterController>().enabled=true;
            Debug.Log("Teleported");
        }
    }
}