I'm working with viewport frames right now and I need to be able to center a model, however there is no position property for models. The model's primarypart exists but it is not in the center. Is there any ways to get the center position of a model and if not, I would like to know the best way to work around it.
✓ ANSWER ACCEPTED
Ways to get the center position of model?
2 answers
✓ Accepted answer
I assume you can do this by using Model:GetBoundingBox().
local model = workspace.Model
local orientation = model:GetBoundingBox()
local position = orientation.p
I haven't tested this code out however.
Ok, I found out how to do this after looking in a bit more about models. There is a function which is :GetBoundingBox() and it returns the CFrame and size of the bounding box of a model.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
I just found out about this