i have no errors but it wont work please help! I add a Partical system as my TP’s an then inserted abox collider which i set the trigger to true, now why is it when i play the box collider isn’t working like it should, it should work like an invisble door that takeyou to pointb, I parented the TP’s to one another but the portles act a a barrior instead of a portal
#pragma strict
var target : GameObject;
var adjust : float;
var c1 : Color;
var jump : boolean;
function Start (){
renderer.material.color = c1;
}
function OnTriggerEnter(other : Collider){
if(!jump){
if(other.tag == "Player"){
target.GetComponent(Teleport).jump = true;
other.gameObject.transform.position = Vector3(target.transform.position.x, target.transform.position.y + adjust, 0);
}
}
}
function OnTriggerExit(other : Collider){
if(other.tag == "Player"){
jump = false;
}
}