Hi, i want to find difference value between 2 pivot points.
I’m trying to save one of the model pivot point value on a player plot so I can load back it in the correct place when player rejoins.
already tried Difference = a:GetPivot() - b:GetPivot()
But it wont work.
How can I do this?
Thanks!
Could you provide some code that shows how you’re using the variable? It’s not clear what you’re trying to accomplish with the pivot difference. The only advice I can give is that you should make sure you have your operands in the right order because I’ve made that mistake one too many times.
pivot is a cframe and you get from 1 cframe to another cframe by multiplying (matrix multiplication) by another cframe.
call a:GetPivot() as ‘A’ and b:GetPivot() as ‘B’. then the difference call it ‘X’
B = A * X
so X = (A inverse) * B because that is (A inverse) * B = (A inverse) * A * X and A and its inverse cancel to just give X