I know how this method supposed to work, but when I use it I get absolutly bizarre values, like the part im refering to was in totally different spot. Not only that, I tried to use this method on 2 objects lined next to eachother in a small distance (like 25 units) and vectors I got were not even similiar, like the actual reference points to this method were random. For those that need code to understand, those are the lines that are important:
local refvector=reference.CFrame:VectorToObjectSpace(root.Position)
print(“vectortos=”,refvector)
local mid=workspace.platform.midz
print(“mid=”,mid.CFrame:VectorToObjectSpace(root.Position))
“reference” is just another part, same as midz part, two blocks next to eachother. The result I get is:
vectortos= 261.97021484375, 4.007532596588135, 117.10627746582031
mid= 117.08590698242188, 4.007532596588135, -261.97930908203125
Its like the actual parts were 144 units apart (clearly not) and also one of them had totally twisted pivot (also not the case), beside the fact that those numbers are completely off the positons of those parts. Can someone explain that?
EDIT: It turns out this method uses the position where referenced part was created, not where it actually is after moving it. How can I change that? Should I report it as a bug?