public void Attach(GameObject wellGameObject) { attachedToScript = wellGameObject.GetComponent <Well>(); attachedToScript.AttachBucket(this.gameObject); attached = true; }