Target and Object variables in Script Controllers will cause the whole object subAnim tree to be evaluated when the controller value is updated.
In cases where the final result of the script controller has to depend on other properties of the same object it is assigned to, creating a Target or Object Variable is prevented by MAXScript with a Runtime error to avoid "vicious circle" conditions. Otherwise, the update of the controller will cause other properties to update and in turn cause the controller to be updated again, without an end.
In these circumstances, a Node Variable can be used instead.
The variable will contain a reference to the scene node and the script controller's expression will access the necessary property from the node instead of pointing directly at a subAnim or MAXWrapper object:
Moving the teapot along the X axis will automatically scale its X axis according to the distance to the world origin.