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

May someone explain me, what is manitude in ROBLOX Scripting?

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.

1 comment

0

MANitude means how manly you are

1 answer

✓ Accepted 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

4

Sorry that I made a mistake like most humans do, but no need to be rude about it.

0

you might want to reformat it though, the isn't displaying correctly

0

And besides that, the wiki uses magnitude over Magnitude, so I didn't know.

0

thebayou that's part of the formula that is used on the robloxdev article.

0

yeah but that's for html formatting and it's not displaying properly on this

0

just remove the s

0

The roblox wiki uses it because that article is outdated.

0

Oh okay thanks thebayou

0

Thank you

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