iTween value doesnt change

var dis:float;
function Update () {
iTween.MoveUpdate(gameObject,{“x”:transform.position.x - dis});

I’m setting float “dis” from another script. At the begginning it’s 6, but when I change it on runtime to 4 or something, iTween doesnt move object, it still uses value 6. I can see that value is changing on editor, but iTween still doesnt use the new value.

Is this somekind iTween bug? How I can fix this?

Why are you using MoveUpdate instead of MoveTo? Why are you using MoveUpdate without specifying an update function for the call to refer to?

Using the iTween.Hash function is good. Check that out.

Possible reason this is happening – is it possible you are adjusting a public variable in the script, and not in the inspector? Make sure that the variable “dis” is private, and then try changing it again.

Let me know how it goes?