Relocate script

Need Help, so I have a gameobject wherein upon collision of Player, Player will be transported to a different coordinate in the scene. Here’s my script:

[code=CSharp]using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Relocate : MonoBehaviour
{
    public float x = 20;

    void onTrigger(Collider Col)
    {
        if (Col.CompareTag("Player"))
        {
            transform.Translate(x, 0, 0);
        }
    }
   
}

I would change transform.Translate(x, 0, 0) into transform.position = new Vector3(x, 0, 0)