How do You find a model's size? I have no idea where to start on this one, I need it for a script that only let's You insert models under a certain size limit.
Also, is it possible to check the model's size without inserting it?
How do You find a model's size? I have no idea where to start on this one, I need it for a script that only let's You insert models under a certain size limit.
Also, is it possible to check the model's size without inserting it?
So lets create a completely random model, just for an example:
local model = Instance.new('Model', Workspace) --Makes our model
for i = 1, 20 do
local part = Instance.new('Part', model) --Creates a part
part.Anchored = true
part.Size = Vector3.new(math.random(1,50), math.random(1,50), math.random(1,50)) --Random size
part.Position = Vector3.new(math.random(1,50), math.random(1,50), math.random(1,50)) --Random positions
end
We have no clue what the size of the model is, so you can try this at the end of that script:
print(model:GetModelSize())
Give it a shot, and let me know if I need to elaborate.
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
You mean there's a GetModelSize Function? I'm laughing so much Right now, I didn't check to see if there was a pre-loaded function.
Lol, it's ok. People underestimate the methods of models all the time. I didn't even know TranslateBy() existed until I looked it up!