function classesManager:GiveClass(player)
local class = dataManager:GetClass(player)
if class then
local character = player.Character
if character then
local humanoid = character.Humanoid
if not humanoid then return end
for _, v in ipairs(classes:FindFirstChild(class).Armour:GetChildren()) do
character[v.Name].MeshId = v.MeshId -- Error here
end
end
end
end
I’m trying to eventually use a custom created character mesh for my game that has all the R15 parts (bar HumanoidRootPart and Head) and my plan was that I could surely just change the current MeshId of the characters body part to the MeshId of the custom mesh. I got this error:
[Unable to assign property MeshId. Script write access is restricted]
No clue what it means, never had this error before.
I’ve looked around here as well as the Developer Hub. Applying R15 packages to characters seems a lot more tedious than R6 and from what I’ve seen, requires massive modules/scripts to get all the parts and put them on the character and scaling and attachments, etc.
The major problem with a lot of these though is they use InsertService and AssetService (to get already existing packages) but since mine is custom I can’t use that.
Secondly, the code just takes up a lot of space and I can’t understand any of it I’d like to keep it basically as small and as simple as possible. 1 function like above would be absolutely lovely but I don’t know if that is possible If anyone can explain what the error means, way around, etc. That would be great
Or if there is a better way (that does not involve several functions ) then please tell me