var player: Transform;
var Jeep: Transform;
var PlayerCamera: Transform;
var JeepCamera: Transform;
function Update (){
if(Input.GetKey("v"))
InCar = 0;
player.GetComponent(CameraMouse).enabled = true;
player.GetComponent(FPSWalker4).enabled = true;
PlayerCamera.GetComponent(Camera).enabled = true;
PlayerCamera.GetComponent(AudioListener).enabled = true;
player.transform.parent = null;
Jeep.GetComponent(CAR).enabled = false;
JeepCamera.GetComponent(Camera).enabled = false;
JeepCamera.GetComponent(AudioListener).enabled = false;
if(Input.GetKey("e"))
{
InCar = 1;
player.GetComponent(CameraMouse).enabled = false;
player.GetComponent(FPSWalker4).enabled = false;
PlayerCamera.GetComponent(Camera).enabled = false;
PlayerCamera.GetComponent(AudioListener).enabled = false;
player.transform.parent = Jeep;
player.transform.localPosition = Vector3(-0.3,3,.3);
Jeep.GetComponent(CAR).enabled = true;
JeepCamera.GetComponent(Camera).enabled = true;
JeepCamera.GetComponent(AudioListener).enabled = true;
}
}
I know there are lots of enter car posts but i haven't seen any that answer this question. When i press "e" i will transform to my position, but i have to hold it to stay there, and when i stay there most of the time, not all the time just most, the player will start Growing, sometime realllly fast and crash the game other time it happens slowly or not at all?