Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to correctly use .Magnitude?

Im just trying to use .Magitude in my code, and I keep getting this error: "Script:119: invalid argument #2 (Vector3 expected, got number)" I thought to myself, well that makes sense let me just check what two numbers im using, so I quickly ran a little test,

print(Origin)
print(NextRayCastResult.Position)
print(NextRayCastResult.Position - Origin.Magnitude)

And I still get the same error, even though the two numbers im printing are, " -68.0875702, 4.31100368, -19.1682014" and "-23.4436131, 3.29892087, -31.8831596." How am I incorrectly using .Magnitude?

1 answer

Well, im an idiot, this has nothing to do with the code I showed above: please just disregard my question all together.

This discussion is preserved as it was. New answers, comments, and votes are closed.