#pragma strict
var player : GameObject;
function Start()
{
}
function Update()
{
if (transform.position.x == 5) {
player.transform.localScale.x = 4;
}
if (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 any thing
sorry for my english because my age is 13 and my native language is niot english