Accessed None trying to read property SkeletalMesh.

I would test that the script works properly. I think that the error means that you are trying to access the skeletal mesh on a “none” which means that the “The” is not valid but I could be wrong