Accessories/Meshes impossible to manipulate?

Hello devforum,

On/off for the past few months, I’ve been attempting manipulate accessories and their meshes through scripts, however to no avail.

Attempted methods:
Loading accessory in separate parts
Directly editing Accessory.TextureId (it’s a read-only value.)
Loading texture seperately as a decal and then applying the loaded texture
Using EditableMesh
(I am yet to try with EditableImage)

Latest script (very bare bones because I haven’t spent a lot of time on the current version yet):

local AssetService = game:GetService("AssetService")

function insertAccessory()
	local meshId = 123456789 -- replace with the asset ID of the mesh you want to load
	warn("Function started")
	-- Create an EditableMesh object
	local editableMesh = AssetService:CreateEditableMeshAsync(meshId)
	warn("Created editable mesh")
	-- Create a new MeshPart object
	local meshPart = Instance.new("MeshPart")
	warn("Created meshpart")
	-- Set the mesh and texture for the MeshPart
	meshPart.MeshId = editableMesh.Id
	meshPart.TextureId = 456789012 -- replace with the asset ID of the texture you want to load
	warn("Set meshpart properties")
	-- Parent the MeshPart to the workspace
	meshPart.Parent = workspace
	warn("Relocated meshpart")
	-- Set the name and CFrame of the MeshPart
	meshPart.Name = "Prototype"
	meshPart.CFrame = workspace:WaitForChild("ghost").CFrame
	warn("Finalised adjustments finished.")
end

If anyone has any possible solutions please reply.
I have tried asking multiple AI like the Assistant, ChatGPT and Gemini, all have failed.

Thanks in advance for your help.

1 Like

EditableMesh does not allow loading MeshIDs that are not uploaded by the experience owner.

If you’re trying to specifically edit the TextureId of a MeshPart or SpecialMesh, it is not a read only value. (With exception of SurfaceApperance properties, which are completely restricted.)


Above are the .TextureId properties for both MeshParts and SpecialMeshes. The parallels state that these are read-only values and will cause an error upon an attempt to write.

No. Read Parallel means that they are safe to read from a multithreading context. It has nothing to do with their read/write safety in serial execution. A property that has Plugin/RBXScript/NotAccessible Security will not be read/write available.

In fact, literally right under the text in the screenshot you posted, there’s this:

TextureID can be written to just fine.

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		task.wait(1)
		local ac = char:FindFirstChildWhichIsA("Accessory", true)
		local acM = ac:FindFirstChildWhichIsA("MeshPart", true) or ac:FindFirstChildWhichIsA("SpecialMesh", true) 
		if acM:IsA("MeshPart") then
			acM.TextureID = "rbxassetid://10470600"
		else
			acM.TextureId = "rbxassetid://10470600"
		end
	end)
end)