I would be very thankful to person who answer my question with having a time. Reason why I am asking this is I see a lot of .manitude >= number in scripts and I really want to know what it is, so If anyone can take some time and explain me that, I would be very thankful and I would reward them with accepting thir answer. Thanks for everyone who can help me and who have a time for this.
May someone explain me, what is manitude in ROBLOX Scripting?
1 answer
Magnitude means the length of a vector (distance between two points). It's used in ROBLOX to find the distance between two positions, using the formula "sqrt(x2 + y2 + z2)" according to the wiki. People use > to see if the distance is at a certain point to do a certain thing such as alert a player. You can learn more in depth about this here.
Example
local position1 = workspace.Part1.Position
local position2 = workspace.Part2.Position
local distance = (position2 - position1).Magnitude -- find distance between two parts
if distance > 5 then
-- do stuff...
end
9 comments
Sorry that I made a mistake like most humans do, but no need to be rude about it.
you might want to reformat it though, the isn't displaying correctly
And besides that, the wiki uses magnitude over Magnitude, so I didn't know.
thebayou that's part of the formula that is used on the robloxdev article.
yeah but that's for html formatting and it's not displaying properly on this
just remove the s
The roblox wiki uses it because that article is outdated.
Oh okay thanks thebayou
Thank you
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
MANitude means how manly you are