How to set an objects transform properties

Im trying to script a way for the player controller to teleport back to the start of the level once they hit a game object. I’ve gone through this for about 8 hours; looking into way I can use transform.properties and etc to set the X Y Z axis (relative to the world) and none of it works. Here is the method I’m using to detect if the controller hits the game object that acts as the restart trigger

restart = Physics.CheckSphere(groundCheck.position, groundDistance, teleportMask);

This is just a direct rip off of brackeys first person controller video with this line of code that changed so that it targets a different layermask (the red floor)

For anyone wondering here is the original line of code from brackeys tutorial:

isGrounded = Physics.CheckSphere(groundCheck.position, groundDistance, groundMask);

Here is the video timestamped for you guys to see what it exactly means cause im not a good explainer.

Anyway if you’re curious I also plan to use an if statement so that once the player makes contact with the red block it will set the X Y Z coordinates of the player controller (the thing i can’t figure out)

What you are describing can be split into a few ideas.
First - What and why you are trying to teleport
Second - Do you know the start position.
Third - Other limitations like - Physics , Input etc…

When you answer those questions rest will be easy, hit me up if answer is not satifsying.