I am trying to write a script to teleport my players around. I tried writing one for spawn but I keep getting error CS0119.
Here is my script.
using UnityEngine;
using System.Collections;
public class Teleport : MonoBehaviour {
void Start () {
}
void Update () {
var player = GameObject.Find ("Character");
if (Input.GetKeyDown ("1"))
print("Going to Spawn");
if (Input.GetKeyDown ("1"))
player.transform.position = Vector3(593, 10, 1557);
}
}