I tried to do some little effects when player hits an object. But it happened some error:
Expression in statements must only be executed for their side-effects.
This is my whole script:
var EffectGUITexture : GUITexture;
function OnTriggerEnter () {
if(gameObject.tag == "item"){
EffectGUITexture.transform.localScale.x==-0.05;
}
}
I’ve searched about the same error in the community, but I still have no idea with solving my problem…
Anyone can help? ![]()
I always got this error and dont know why it happened…