I want to get the position of a random vertex from a 3D mesh used in a standard Roblox R6 avatar (e.g., the head, torso, etc.) so I can use it for gameplay logic or visual effects.
When I try to load the mesh using AssetService:CreateEditableMeshAsync(MeshId), I get this error:
AssetService::CreateEditableMeshAsync failed because no permission to load asset
This happens because built-in R6 avatar assets (and R6 bundles) are protected and cannot be accessed via CreateEditableMeshAsync due to permission restrictions.
Additional details:
Here’s the relevant code snippet:
local AssetService = game:GetService("AssetService")
local EditableMesh = AssetService:CreateEditableMeshAsync(MeshId) -- error occurs here
local Vertices = EditableMesh:GetVertices()
local RandomVertex = Vertices[math.random(1, #Vertices)]
local RandomVertexPosition = EditableMesh:GetPosition(RandomVertex)
Note: I don’t actually need to edit the mesh—just read its geometry (vertices and their positions). Is there a workaround to bypass the permission restriction, or another way to obtain this vertex data?