GetModelSize (Method): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>SCARFACIAL No edit summary |
>Flurite copied source from GetModelCFrame(0 |
||
Line 7: | Line 7: | ||
{{clear floats}} | {{clear floats}} | ||
{{Example|< | {{Example| | ||
This code would create a model, put some parts in it, position them randomly, and then print its position: | |||
</ | <code lua> | ||
local model = Instance.new('Model', Workspace) -- Create a model. | |||
for i = 1, 5 do | |||
-- Fill the model with randomly positioned parts. | |||
local part = Instance.new('Part', model) | |||
part.Anchored = true | |||
part.Size = Vector3.new(math.random(5), math.random(5), math.random(5)) | |||
end | |||
print(model:GetModelSize()) | |||
</code lua> | |||
The size my vary depending on the size of the parts. | |||
}} | |||
The ab | |||
[[Category:Methods]] | [[Category:Methods]] |