https://gyazo.com/2a5e18c3fe530033b704c66d107488d3 The link above contain the script and the output. I would like it if you guys can help me on this.
✓ ANSWER ACCEPTED
My line of script got a bad argument #2 (Vector3 expected, got CFrame). Any ideas?
1 answer
✓ Accepted answer
Minor issue: You have a typo where it should be Magnitude.
In this case, the error is quite literal. You cannot Add/Subtract 2 CFrames together, so when it sees a CFrame +/- ( A thing), it expects that thing to be a Vector3. Beyond that, however, you cannot call Magnitude on a CFrame, because it is a complicated object, not simply a vector. If you want the distance between two objects, and you have their CFrames, you can do (Object1CFrame.Position - Object2CFrame.Position).Magnitude instead.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
It won't let me see the whole script :(
Thats because you cannot add a vector3 without a cframe.
Here's a link https://developer.roblox.com/en-us/articles/Magnitude