Can't change player's position

I have a simple script

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class TeleportBack : MonoBehaviour
{
     public Vector3 teleportPosition;
     
     void OnTriggerStay(Collider other){
          if(other.gameObject.tag == "Player") {
               other.transform.Translate(teleportPosition, Space.World);
               Debug.Log("Teleported Player back");
          }
     }
}

It works and all, but the StandardAssets FPSController only gets teleported “visually” to the position while on the collider trigger(in editor the coordinates also change only visually and in game the camera stays on the “visual” coordinates). When walking out of the trigger(with the physical coordinates) player visually goes back to his physical coordinates.
Any ideas?

Figured out I could try disabling the CharacterController before the Translate function and then enable it right after that. Worked for now.

Hi,
I’m a little bit later but I think it’s just because Unity don’t authorize weird position transition like teleportation by default. What you can simply do, is going to Player Setting → Physics and enable Auto Sync Transforms.

other.transform.position = teleportPosition;