Anders Lindén
Anders Lindén

Reputation: 7321

Part Size seems to be ignored

I have a part, created with

local p = Instance.new("Part")  
p.Size = Vector3.new(2, 2, 2)

That part uses a mesh like

local m = Instance.new("SpecialMesh", p)
m.MeshType = Enum.MeshType.FileMesh
m.MeshId = "rbxassetid://7974596857"

which is a cube with rounded corners that I created in blender

enter image description here

When I put those beside each other, it seems like the Size property actually is ignored.

Why?

size 2

p1.Position = Vector3.new(0, 0, 0)
p1.Size = Vector3.new(2, 2, 2)

p2.Position = Vector3.new(5, 5, 0)
p2.Size = Vector3.new(2, 2, 2)

enter image description here

size 5

p1.Position = Vector3.new(0, 0, 0)
p1.Size = Vector3.new(5, 5, 5)

p2.Position = Vector3.new(5, 5, 0)
p2.Size = Vector3.new(5, 5, 5)

enter image description here

Upvotes: 0

Views: 105

Answers (1)

kojocrash
kojocrash

Reputation: 341

That's because special meshes have their own scaling property. If possible, use a MeshPart instead.

Upvotes: 1

Related Questions