How to find body parts in a skinned mesh character?

Hi! I’m planning to make a PvP game using skinned meshes for the StarterCharacter. I’ve done some research and I could not figure this out: how to find the body parts in a skinned mesh, via script?
Let me explain: let’s say I want to a sword to detect when I hit the head so it deals double the normal damage. In a normal R6\R15 rigs, I’d use a conditional check to see if the sword hitbox touched the head. However, in a skinned mesh there is no such thing as individual body parts, so I’m a bit concerned about how welding objects and hitbox detection could work.

Is it a good idea to use skinned meshes for this type of games? There is little to no documentation and the technology seems rather rudimental, which makes me question if it’s worth trying using it or not.

1 Like

I am not really experienced in advanced stuff but what you could try to do is make invisible hitboxes that surround the body parts you choose.

1 Like

Yeah, that’s what I thought too - seems pretty unpractical + I read it’s impossible to weld parts to a skinned mesh. :disappointed:

Is it possible to detect the bones of the mesh and use the hit detection that way?
I had just looked up what skinned meshes are and I was right about my knowledge in the first post

It’s unclear, but I don’t think so. Bones seem to act like Motod6D and Welds, they have no geometry.

Ah, I didn’t see your edit. Or maybe I’m just sleepy and didn’t see the full message lol.
I’m not sure what you mean here?

Sorry for bumping, does anyone know a method?

sorry for late reply.
It is possible to surround every bone in your SkinnedMesh with HitBox parts.


not sure how accurate or fast that would be. I’m pretty sure that HitBox parts will lack behind skinned meshes, but it is the only possible way I know to make “dynamic” hitbox collision detection. You can’t really detect SkinnedMesh collision properly, the collision is static and it retains it’s position even if you move a bone, that’s why a lot of games even outside of Roblox use HitBoxes surrounding each bone of a Playermodel. And hitbox collision are way easier to detect, than bones
You are right about Bones acting similar to Motor6D. To attach HitBoxes to individual bones, you can do something like this:

HitBox.CFrame = bone.TransformedWorldCFrame

TransformedWorldCFrame gives you bone’s CFrame of an animation, similar to how Transform works. The only difference is that it gives WorldCFrame, which is what you would probably prefer to use. Use this on every bone you need collision for by iterating through table and etc.
https://developer.roblox.com/en-us/api-reference/property/Bone/TransformedWorldCFrame
I suggest you to read Developer website from Roblox more. It has all the useful properties and tutorials for certain aspect of Roblox Instances, services and much more

Read this, they`re mentioned your problem.