in the output, there's an error saying: "Unable to assign property MeshId. Script write access is restricted"
How do I assign the meshId of the dummy to the one on the character? Please help me.
Assuming you mean copying the packages of the character on to the dummy, you would do something like this in a server script. Keep in mind you have to set the character and dummy variables to make it work:
local character = --set to player character local dummy = --set to dummy model for _,v in pairs(character:GetChildren()) do if v:IsA("CharacterMesh") then local c = v:Clone() c.Parent = dummy end end
This should automatically copy the CharacterMeshes from the player into the dummy.
Otherwise, if you just wanted to only translate the MeshId across, you could do something like
dummyMesh.MeshId = characterMesh.MeshId
where the variables of dummyMesh and characterMesh would be the CharacterMeshes of the character and dummy.