The problem with connecting the knife to the character’s leg is that there is no preset attachments on the legs of packages.
This is hacky, but the best solution I can think of is doing a raycast onto the character’s leg when their appearance loads, and put an attachment at the point of impact. Give it a similar naming scheme to other accessory attachments, and use the same name in a knife accessory. After that, use Humanoid:AddAccessory() to connect a copy of the knife accessory to the leg.
Edit: Just found out R15 body parts use box CollisionFidelity. So there goes the only realistic solution to this problem I could think of. @RuizuKun_Dev unmark this post as the solution, it won’t work.
Sometimes I have to remind myself… This is Roblox, if the items attach good to the default body type, but are ‘floating’ a bit on other packages, its OK, trust me, players won’t care. If your game is solid made, and fun, little things like that, don’t matter, and will just cause you extra time and coding to fix, and even might introduce bugs you might have otherwise not had. Just my 2 cents.
There’s no reason to go the lazy direction and ignore quality. There are ways to get the knife more precisely positioned. Players won’t care until boundaries are broken.
The games of 5 years ago were acceptable back then, but not now as they don’t meet the standards. You don’t get far by meeting the standards typically. You get far by breaking them.
Besides all that, this is a support section, so basically telling the OP not to bother finding a solution isn’t a valuable response at all.
You can create your own attachments under the character’s body parts. As long as the accessory’s Handle has an attachment with the same name, it will work as expected when you do :AddAccessory on the character’s humanoid.
This is a supportive statement, sometimes, you have to weigh the pros and cons of a feature, I know a lot of game makers who get bogged down over details that are not all that necessary. And sure, if its something this artist feels they MUST break the bounds of items not fitting perfectly, and they feel its worth the extra code and time, then so be it, but it doesn’t hurt to point out, that it might not be worth the trouble in the first place. If you read many posts on here ( I will just assume you do) you will find many responses to topics that follow this pattern, of stating that the feature might not be that important in the first place. So before you call my response out, as being ‘non supportive’ how about you try to understand exactly what it is I am saying, and actually look at how this is not a unique reply to a post based on other forum threads.
It’s one thing to say a huge amount of code and work isn’t necessary. My response was because I already proposed a really easy, quick solution. There’s no reason to not use such a simple solution, especially when the OP is clearly seeking a solution to the problem.
You can suggest that something isn’t worth the work if ‘the work’ is a lot for a little, but in this case it isn’t. This case involves a very little amount of work for a much cleaner result.
I’m sorry that you feel your response should be the only valid response, but unfortunately it’s not. As the op didn’t mark yours as a solution, it seems that its open for others to post what they feel will be productive to the conversation, thus I did so. There are more ways to look at something other than yours, I presented my view of this for the op to consider, it just so happens it’s a different view point than your own, but that should not keep me, nor anyone else from commenting with our (different than your) views.