Well once again I am having issues as a beginner developer. This time the code works up until the point when the vehicle is mounted. It will mount for a split second then send out the debug "off" again. Help?
function OnTriggerStay(other : Collider) {
if (other.tag == "Player1") {
if(Input.GetButtonDown("Mount1")) {
if(mounted) {
player1.GetComponent("Player1Move").enabled = true;
target.GetComponent("P1MountMove").enabled = false;
player1.parent = null;
Debug.Log("off");
if(mount == player1) {
mounted = false;
mount = null;
}
} else {
mounted = true;
player1.position = seat.position;
player1.LookAt(faceObject);
player1.GetComponent("Player1Move").enabled = false;
target.GetComponent("P1MountMove").enabled = true;
player1.parent = target;
mount = player1;
Debug.Log("on");
}
}
}