Object's scale changes when it's parented

Below is my code. I was trying to make a generic tool script for my game, but before I could even get to setting its position, I noticed it squished and stretched in strange ways relative to its parent, based on scale and rotation. I can’t find a way to disable that. Also I’m a bit of a beginner, if that explains this. Anyway you may see remnants of me trying to reset its position after parenting it, which of course didn’t work. I also tried to use an empty gameobject scaled at 1,1,1 as the “hands” to see if that’d fix it, but alas, no. Nothing goes my way in this engine, I swear…

using UnityEngine;

public class toolscript : MonoBehaviour
{
  public bool pickedup = false;
  public GameObject hands;
  public GameObject tool;
  public Rigidbody toolRB;  // comment out for no physics on the tool
  private Vector3 originalScale;

  void Start()
  {
    originalScale = tool.transform.lossyScale;
  }

  void Update()
  {
    if (Input.GetMouseButtonDown(0))
    {
      Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
      RaycastHit hit;
      if (Physics.Raycast(ray, out hit))
      {
        if (hit.collider.gameObject == tool)
        {
          pickedup = true;
        }
      }
    }
    if (pickedup)
    {
      tool.transform.SetParent(hands.transform, true);
      toolRB.isKinematic = true;  // comment out for no physics on the tool
      GetComponent<Collider>().enabled = false;
      if (Input.GetMouseButtonDown(1)) {
        pickedup = false;
      }
    }
    else
    {
      tool.transform.parent = null;
      toolRB.isKinematic = false;  // comment out for no physics on the tool
      GetComponent<Collider>().enabled = true;
    }
  }
}

Keeping your object hierarchies clean for scaling:

Any object that has children needs to be (1,1,1) scale.

Any object that has non-uniform scaling should NEVER have children.

This means that only “leaf” objects with no children should be scaled.

The only exception would be if you know an entire hierarchy will NEVER be changed, in which case you might consider scaling it from a higher-level object, such as the top object, or a known “scaling” transform in the hierarchy.

You can accomplish this in many ways, sometimes even by adding extra non-scaled non-rotated empty GameObjects in your hierarchy, and then “hang” other scaled objects off those empty GameObjects.