teleporting and re-spawning character in unity 5 2D

hello i am having difficulty with making a script that makes you re-spawn if you touch a certain 2d sprite i know the 3d version of this script is

var warptarget : Transform;

function Update () {`


function OnTriggerEnter (col : Collider) {

	if (col.gameObject.tag == "warp001") {
		this.transform.position = warptarget.position;

can someone please tell me how i can make this script suitable for a 2d game

PS. it is actually being built in 3D mode.

There is no such thing as “3D mode”… if you’re using 3d physics components attached to your sprites (Box Colliders, Sphere Colliders, and Rigidbodies), this script will work as-is.
If you’re using 2d physics components (BoxCollider2Ds, Circle Colliders, and Rigidbody2Ds), then you need to change the method signature to OnTriggerEnter2D(col : Collider2D).