Easiest way to equip a package onto an R15 character?

Hello.

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.

What’s the easiest way of equipping a package onto an R15 character?

1 Like

Delete old limb, Add the new limb, Humanoid:MakeAttachmentblabla().

You can get the package Contents from AssetService. I feel like CloneTrooper have a example in his Models

Sent from phone

2 Likes

I don’t need InsertService because these are premade characters. I’ll look into your other answer when I’m home.

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.

This may help:

https://devforum.roblox.com/t/how-do-you-morph-an-r15-character/43611/4

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)

8 Likes

Any idea why, when I click on the link, it says “Sorry, you don’t have access to that topic!”

So, not being able to see what that link is about, all I can say, is yes, with R15, you just rebuild the character.

Sorry, you don’t have access to that topic!

@SelDraken It’s probably on Development Discussion, a member only board.

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.

1 Like

Last I heard, they’re working on an API that will make this far easier to do. Stay tuned.

6 Likes

This worked! Thank you very much.

I hope so. Anything that makes Humanoids easier to mess with like that gets an okay in my book.