#pragma strict
var player : GameObject;
function Start()
{
}
function Update() {
if (player.transform.position.x == 5) {
player.transform.localScale.x = 4;
}
if (player.transform.position.x == –5) {
player.transform.localScale.x = –4;
}
}
i make gameObject and i wanna this game object rotation when its position equeal 5 i use the code above and nothing happen
what the wrong of my code
sorry for my english