Editable Mesh is not visible in workspace

I have a script that is meant to create an editable emesh from a roblo asset
the script is:

local mesh = game:GetService("AssetService"):CreateEditableMeshAsync("rbxassetid://116838440116919")
mesh.Parent = game.Workspace
local pointVerts = {} -- to merge close verts, :MergeVerticies didnt work.
for i,v in pairs(mesh:GetVertices()) do
	local id = 0
	for wstidb,d in pairs(pointVerts) do
		for _,p in pairs(d) do
			if (mesh:GetPosition(p)-mesh:GetPosition(v)).Magnitude < 0.2 then
				id = wstidb
			end
		end
	end
	if id > 0 then
		pointVerts[id][#pointVerts[id]+1] = v
	else
		pointVerts[#pointVerts+1] = {v}
	end
end
print(pointVerts)

this should work as i am not even editing the mesh but the editable mesh is in workspace but isnt visible, the script is also a localscript, is there something i am doing wrong?

EditableMesh should be a child of a MeshPart to render.

ah, thanks so much! I didnt realise it would have to be parented to a mesh part, just thought it acted like one!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.