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

How do I load a file mesh on a script?

I want to use a file mesh and load and asset Id. Here is my current script:

local p = Instance.new("Part")
	p.Position = script.Parent.Position
	Instance.new("SpecialMesh", p)

I want to change this to FileMesh and then load an asset Id. Could someone explain?

1 answer

✓ Accepted answer

Change the "SpecialMesh" to "FileMesh" and then for the mesh and texture ID, just set it as an asset.

local p = Instance.new("Part", game.Workspace) -- You didn't parent it, just a little tip.
p.Position = script.Parent.Position
x = Instance.new("FileMesh", p)
x.MeshId = "SOMEROBLOXASSET"
x.TextureId = "SOMEROBLOXASSET"

2 comments

0

Thanks again.

0

No problem!

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