Why my object scale by himslef?! (js)

Okey, i created some scripts to create an FPS with an Axe there are the scripts:
ItemPickupSystem

#pragma strict
var canHover : boolean = false;
var width = 100;
var height = 100;
var width2 = 100;
var height2 = 100;
private var itemScript : ItemScript;
private var Name : String;
var handTexture : Texture;

//Items variables
var axeInHands = false;
var somethingInHands : boolean = false;

//
public var pickupLayers : LayerMask;
private var heldObject : GameObject = null;

function Update(){
	var ray : Ray = Camera.main.ScreenPointToRay(Vector3(Screen.width/2,Screen.height/2,0));
	var rayHit : RaycastHit;
    if(Physics.SphereCast(ray, 0.2, rayHit, 4, pickupLayers)){
    	canHover = true;
    	itemScript = rayHit.collider.gameObject.GetComponent(ItemScript);
    	Name = itemScript.itemName;
        if(Input.GetButtonDown("Interact")){
            // Do the axe variable
            if(rayHit.collider.gameObject.GetComponent(AxeScript) != null){
            	axeInHands = true;
            	somethingInHands = true;
            }else{
            	axeInHands = false;
            	somethingInHands = false;
            }
        }
    }else{
    	canHover = false;
    }
    //Drop system
    if(somethingInHands && Input.GetButtonDown("Drop")){
    	axeInHands = false;
    	somethingInHands = false;
    }
    
}
function OnGUI(){
	if(canHover && !axeInHands){
		GUI.Box(Rect(Screen.width / 2 - width, Screen.height / 2 - height, 150, 25), ("Pick up the " + Name));
		GUI.DrawTexture(Rect(Screen.width/2- width2,Screen.height/2 - height2,75,75), handTexture, ScaleMode.StretchToFill, true, 10.0f);
	}
}

**AxeScript**

#pragma strict

var itemPickupSystem : ItemPickupSystem;
var animationvar : Animation;
var rigidbodyVar : Rigidbody;

var axe : Transform;
var axeGO : GameObject;

var target : Transform;
var yOffset : float;
var xOffset : float;
var zOffset : float;

function Start () {
	itemPickupSystem = GameObject.FindGameObjectWithTag("Player").GetComponent(ItemPickupSystem);
	animationvar = GameObject.FindGameObjectWithTag("Item").GetComponent(Animation);
	axeGO = GameObject.FindGameObjectWithTag("Item");
	rigidbodyVar = GameObject.FindGameObjectWithTag("Item").GetComponent(Rigidbody);
	target = GameObject.Find("TargetToMelee1").transform;
}

function Update () {
	if(itemPickupSystem.axeInHands){
		axe.parent = target;
		axeGO.layer = 11;
		axe.localPosition = Vector3(0,0,0);
		if(Input.GetButtonDown("Fire1")){
			animation.Play("Axe_Melee1", PlayMode.StopAll);
		}else{
			animation.PlayQueued("Axe_Idle");
		}
	}else{
		axeGO.layer = 10;
		axe.parent = GameObject.Find("_Stuffs").transform;
		animation.Stop();
	}
	//Detaches the transform from its parent.
	//transform.parent = null;
}

The problem is, when i pickup the axe, the axe grow automatically and irregulary AND I DON’T KNOW WHY:
alt text

I checked the parents, parents’ scale doesn’t change AT ALL!FTW!
alt text
Can someone help me?! :cry:

You can see the problem with a simple example that anyone can do at home:

Say you have an empty scaled just (1, 1, 1). And say you’ve got a cube in it spun so an edge faces up (for example, 45 degrees on z.)

You can scale the Cube all you want, and it will stretch very nicely on it’s rotated axis, always staying a nice rectangle.

Now scale the parent empty’s y by 1.3, like in your parent. That says to stretch the cube on the real Y, straight up and down. The cube gets twisted into a diamond. But still so far, so good, since you did it on purpose.

The problem is, do the same thing but the other way. Have the rotated size (1,1,1) cube not in the empty. Scale the empty (1, 1.3, 1) and then put the cube inside it. Like your pick-up script does. It will snap into that same weird diamond. It isn’t a Unity problem, it’s just the way math rotations work. There’s no way to “counteract” the parent 1.3 Y using the child’s scale.

The fix is usually to have all parents as (1,1,1). If you need the player scaled (1, 1.3, 1), then take just the player model (not the script, or collider, etc…) and turn it into a child.