Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Confused on mesh scale property?

So, I'm trying to insert a mesh into a part, but I'm confused on the Scale property. How would I set the property?

p = Instance.new("Part")
p.Parent = script.Parent
p.Name = "Handle"
m = Instance.new("SpecialMesh")
m.Parent = script.Parent.Handle
m.MeshId = "rbxassetid://4372594"
m.MeshType = "FileMesh"
m.Scale =  --??

1 answer

✓ Accepted answer

.Scale is a Vector3, much like .Size -- you would have seen this if you looked on the wiki.

To construct a literal Vector3, you can use the Vector3.new(x, y, z) constructor

For "FileMesh" SpecialMeshes, it corresponds to a scale factor of the mesh's coordinates, which are specified in studs. It ignores the size of the part.

Approximately 1, 1, 1 should be appropriate for ROBLOX uploaded meshes to be approximately size of 0.5 to 4 studs.

This discussion is preserved as it was. New answers, comments, and votes are closed.