I am writing a character system for my game where players can become one of several preset characters. The only thing I can’t wrap my head around is the best way to equip a package. On R6, there’s only one object that you can just copy over, but on R15 every limb is a MeshPart with a different id and texture.
You only need to make a script as what i said, Delete the Limb, Clone the new Limb with the same name, run a function on Humanoid that connects all Body Attachments.
EXCERPT:
Given the fact I’ve literally done that exact thing, it’s not actually more difficult lol.
function module:ApplyPackage(character, packageFolder)
local humanoid = character:FindFirstChildOfClass(“Humanoid”)
if not humanoid then return end
for _,v in ipairs(packageFolder:GetChildren()) do
local part = v:Clone()
character[v.Name]:Destroy()
part.Parent = character
end
humanoid:BuildRigFromAttachments()
end
packageFolder is just a Folder full of MeshParts copied directly from the folders you get using AssetService:GetAssetIdsForPackage(packageAssetId)
For an RPG game I was messing around with, I made the armor system using pre-built R15 characters.
To morph the player, I looped through all the contents of the prefab and copied the objects into a model inside the player’s character. I then welded each object to the corresponding object in the character, and set the transparency on the default objects.
If I needed to get rid of the morph, I could just delete the model. However of course it also means there are double the objects.