I have a script that works:
X = math.random(-10,10) --this doesn't have to be math.random
if X < 0 then
X = X*-1
end
print (X)
But I'm wondering if there is a better way, especially if I'm trying to get the absolute value of multiple numbers, possibly vector 3.

5 comments
I want to use this to get how far two parts are apart.
https://wiki.roblox.com/index.php?title=Global_namespace/Mathematical_functions
math.abs
So I just put X = math.abs(X) ? Is that right? If so that was just what I was looking for!
Ok I checked. It is right. Post as an answer so I can accept. Thanks!