EDIT: Apparently this isn't what you wanted, but I'll keep it for future reference :P
First off, I believe you get magnitudes using subtraction, not division, so:
local mag = (pos1-pos2).Magnitude
Next, to use percentages, you need to have a value that state's what 100% would be, so:
local distanceToTravel = (pos1-pos2).Magnitude
Then, to calculate the percentage, you get the maximum percentage (100%), divide it by the "100% value", then times it by the current value:
local distanceToTravel = (start-destination).Magnitude
local travelledDistance = false
while travelledDistance == false do
local percentage = 100/distanceToTravel*((curPos-destination).Magnitude)
if percentage >= 100 then
travelledDistance = true
end
end
Hope I helped! If you have any questions, please ask!
~TDP
4 comments
Do you mean, you want to check how far a player is from their destination, the start point being where the quest/etc. was started?
Yeah something like that, except in this case, I have 2 bricks and I want to check how much does brick1 overlap brick2 in terms of percentage.
You mean overlap? I'm confused :p
Would this help? http://imgur.com/a/gIN18