-
I feel like the title explains itself.
-
I am unable to write MeshId with a script
-
I have only tried using InsertService to fix the problem but i only run into the problem of the restrictions of LoadAsset
ham=game.InsertService:LoadAsset(tonumber(m.MeshId:sub(14))).MeshPart
For more context this is involved with player’s accessories/hats
Here is the full function, i might provide full script if needed!
function hatcopy(hat)
ha=hat:FindFirstChild("Handle")
if ha then
ha.CanCollide=true
m=ha:FindFirstChildWhichIsA("SpecialMesh")
if m then
ham=Instance.new("MeshPart")
ham.MeshId=m.MeshId
ham.TextureID=m.TextureId
wait()
ham.Size=Vector3.new((ham.Size.X*m.Scale.X),(ham.Size.Y*m.Scale.Y),(ham.Size.Z*m.Scale.Z))
ham.CFrame=ha.CFrame
ham.Parent=workspace
ham.Name=(hat.Name:lower()):gsub(" ","")
game.Debris:AddItem(ham,20)
hat:Destroy()
else
return
end
else
return
end
end
console screenshots if needed
with insertservice:
without:
ive also been told it only would work in localscript, can someone tell me if this is true or not?