ok so ime making a Ai for a racing game and i nead the car to turn so i thought ide use the on enter function but the If statment aint working and the look at isnt working.
var target : Transform;
function OnTriggerEnter (other : Collider)
{
if Collider.name == "carAI"
{
Collider.transform.LookAt(target);
}
}
IF eror is
Assets/costom scripts/AI/AI turn 1.js(5,27): BCE0044: expecting ), found '='.
look at erors are
Assets/costom scripts/AI/AI turn 1.js(5,38): BCE0043: Unexpected token: ).
Assets/costom scripts/AI/AI turn 1.js(7,50): BCE0044: expecting :, found ';'.
Yea that'll make it hard. Good luck with it.
– anon73820239