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

Getting Lowest/Highest Coordinates?

Asked by
Vezious 310 Moderation Voter
9 years ago

Is It Possible To Get The Lowest Coordinates of a Model And The Highest Coordinates of the model as well?

Is it possible to get the lowest coordinates of a model and the highest coordinates of the model as well?

0
Is this a no? Vezious 310 — 9y

1 answer

Log in to vote
-1
Answered by 9 years ago

try this:

local model = script.Parent.Model --change to your model's path, of course
local mpos = model:GetModelCFrame().p --obtains position of your model
local msize = model:GetExtentsSize() --obtains bounding box around your model
local mlowestpoint = mpos.Y-(msize.Y/2) --subtracts half of the size from the vertical position
local mhighestpoint = mpos.Y+(msize.Y/2) --adds half of the size to the vertical position
Ad

Answer this question