PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

GetModelSize

The GetModelSize function returns the Vector3 size of the Model.

Returns

Return Type Summary

Code Samples


Model:GetModelSize

This code would create a model, put some parts in it, position them randomly, and then print its size:

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())