Hello,
I’m new to using Unity and I was wondering if anyone can see what is wrong with my C# code. My code is as follows:
var destination : Transform;
function OnTriggerEnter(other : Collider) { if (other.tag == "Player")
{ other.transform.position = destination.position; }
I’m trying to teleport my player to another location on my terrain (Which is 3D) and I added this script onto the object i wanted and it just comes up with Assets/NewBehaviourScript.cs(1,17): error CS8025: Parsing error.
Please help if you know what i am doing wrong!