How to move player on collision?

I’m trying to make it so when my character touches the prop_doorOne GameObject it moves to a specific location, but it doesn’t work. Here’s my script.

using UnityEngine;
using System.Collections;

public class Move : MonoBehaviour
{
	

	void OnCollisionEnter (Collision col)
	{
		if(col.gameObject.name == "prop_doorOne")
		{
			transform.position = new Vector3 (-12.92f, 29.24f, 593.8f);
			transform.eulerAngles = new Vector3 (0.0f, 234.0f, 0.0f);
		}
	}
}

I was unable to add a comment for some reason. So i will type this here in case it will help you.
Add the following line above the if statement on line 10 above.

Debug.Log("collision detected with name: " + col.gameObject.name);

This way you can confirm firstly that the collision is being detected at all, and secondly it will give you the name of the object, which you can double-check is what you were expecting.

I think that will help you figure out what is wrong

What exactly isn’t working? You can check if the code is ran by using
Debug.Log(MESSAGE)
You must have a Physics Collider attached to your object. Also, make sure neither of the colliders are set to “Is Trigger”

Finally, as a suggestion, instead of hardcoding the position and rotation in, you can declare two Vector3 variables (one of position, and one for rotation) and use those instead this way you can adjust the variables from within the inspector.