Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Confused on mesh scale property?

Asked by 10 years ago

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

Log in to vote
1
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
10 years ago

.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.

Ad

Answer this question