You cannot call the magnitude function on a number because it is inside the Vector3.new array.
Therefore
height = ((thePart.Position.Y - target.Torso.Position.Y).magnitude) + 60
should be
height = (thePart.Position.Y - target.Torso.Position.Y) + 60
Or, alternatively, if you're trying to get the distance between the two positions
height = ((thePart.Position - target.Torso.Position).Magnitude) + 60
I suggest you look up the distance formula (Which is ((a1-a2)^2+(b1-b2)^2+(c1-c2)^2)^.5=dist or sqrt((a1-a2)^2+(b1-b2)^2+(c1-c2)^2)=dist) to check your understanding.
Presuming you just want the height, I would go with the first solution.
Sources:
Magnitude,
Distance formula
3 comments
oh right thanks, I guess this has to do with magnitude doesn't work with specific Position values as Postion.Y?
Magnitude is for calculating the distance between two positions, it wouldn't make sense to work with specific values as you can just do .Y - .Y
You should explain more and give sources.