Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 6 years ago

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.

0
MANitude means how manly you are Zenith_Lord 93 — 6y

1 answer

Log in to vote
4
Answered by 6 years ago
Edited 6 years ago

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
4
Sorry that I made a mistake like most humans do, but no need to be rude about it. Ultimate_Piccolo 201 — 6y
0
you might want to reformat it though, the <sup> isn't displaying correctly thebayou 441 — 6y
0
And besides that, the wiki uses magnitude over Magnitude, so I didn't know. Ultimate_Piccolo 201 — 6y
0
thebayou that's part of the formula that is used on the robloxdev article. Ultimate_Piccolo 201 — 6y
View all comments (5 more)
0
yeah but that's for html formatting and it's not displaying properly on this thebayou 441 — 6y
0
just remove the <sup></sup>s thebayou 441 — 6y
0
The roblox wiki uses it because that article is outdated. User#19524 175 — 6y
0
Oh okay thanks thebayou Ultimate_Piccolo 201 — 6y
0
Thank you AswormeDorijan111 531 — 6y
Ad

Answer this question