Any obvious reasons why this doesnt work? the problem is the Instantiate player line11,12,13. I cant figure out how the brackets are supposed to work. This script destroys a car and instantiates a fps prefab.Thanks in advance yo
var voice: GameObject;
var car: GameObject;
var camera1: GameObject;
var camera2: GameObject;
var Player : GameObject;
function OnTriggerEnter () {
Destroy(car);
Destroy(camera1);
Destroy(camera2);
Instantiate(Player
transform.position = transform.position + Vector3(0,10,0) ,transform.rotation = Quaternion.identity);
Instantiate(voice, transform.position, transform.rotation);
Destroy (gameObject);
}
AC