Move player after colliding with trigger?

Hello, I’d like help with the code so that when you have your character controller (named and tagged “Player”) collide with a trigger, the trigger will send the player to another location in the scene or to a specific empty game object in the scene. Any help would be appreciated. Thnkx

function OnTriggerEnter(object : Collider){
if (object.GameObject.Tag == “Player”)
{
object.transform.position = emptyObject.transform.position;
}
}

Something along these lines although this stuff isn’t too hard to figure out yourself. I’d advice you to do that first so you have a basic understanding of how you can solve problems like these.