ok so were working on an elevator but its not moving when the npc is activated inside it, right now were testing scripts out and fixing ups ones that arent working but this one has us stumped. and were using unity free so were limited to that, any help is welcome.
C# script
using UnityEngine;
using System.Collections;
public class lift : MonoBehaviour {
public float smooth = 2;
public GameObject Lift;
private Vector3 newPosition;
void Awake ()
{
newPosition = transform.position;
}
void Update ()
{
}
void OnTriggerEnter(Collider other)
{
Vector3 PositionA = new Vector3( 0.9323347f, -0.8528683f, -2.471113f);
PositionA = newPosition;
transform.position = Vector3.Lerp(transform.position, newPosition, Time.deltaTime * smooth);
}
}