Bone merging issue

I’m currently attempting to have an entity attach itself to a player.

It will attach to the player, however, the offset for the bone is off,.

Here is a screenshot of what is happening:

And here is the code I’m using in the entities Initialize function:



local ply = self.Parent;
self:SetParent(ply);
local b, a = ply:GetBonePosition(self.Bone);
self:SetPos(b);
self:SetAngles(a);


Any help on fixing this issue will be appreciated. Thanks.

That’s not bonemerging.

If you want to attach that model to a bone on a player, see Example 2 on this page:

I appreciate the response, however, it’s not just a model, it’s an entity.

Is there not a way to attach an entity to a bone similarly to a model?

Use that code and and transform it to be usable inside your entity’s ENT:Draw()