I’m currently working on a horror game which will have a spirit box like item inside (similar to Phasmophobia). I have got the distance between 2 parts using .Magnitude already but the further away the part is, the bigger the value.
I don’t want this to be the case as I want the value to increase as the parts get closer.
For clarification, my suggestion would be a rational function, whereas the suggestion made by @Jxl_s is linear. Just keep those in mind when deciding which is best for your need.