I don't want to post the code here but i will give an example, so if i have a value called CFrame1 and another called CFrame2 and i try to divide them i would get the error " attempt to perform arithmetic on local 'CFrame1' (a userdata value)", please help!
✓ ANSWER ACCEPTED
Keep getting error when trying too divide 2 cframe values?
1 answer
✓ Accepted answer
I keep getting an error when trying to divide two CFrame values? This is actually due to CFrame values being userdata values that are created and handled by RBX.Lua. Basically this means that you can't divide the values because they're userdata values.
Examples Ok, so if you're wanting to divide to get a Vector3 value you could actually just do:
-- Assume the variable myCFrame1 is the first CFrame and myCFrame2 is the second CFrame
myCFrame1.p / myCFrame2.p
CFrames have a property named "p" which stands for position. You can retrieve the Vector3 portion of a CFrame by taking a CFrame value and getting the p property.
Hope I helped :)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Why do you want to divide two CFrames? That's not a valid operation, which is what the error is telling you.
Oh okay