I’m trying to make a nice little client sided scripted version of EF_BONEMERGE, the benefit of it also being scripted and easy to modify. However, I just can’t get this to work.
The first time I run this I get nothing (although the code does run, I’ve hooked up a print to it before) but if I run it a second time gmod crashes.
Can someone explain/correct my mistakes please?
PlayerTarget=LocalPlayer()
FakeModel:SetParent(PlayerTarget)
function FakeClientBones()
FakeModel:SetupBones()
FakeModel:DrawModel()
for i=1, 128 do
local PlrBonePos,PlrBoneAng=PlayerTarget:GetBonePosition(PlayerTarget:LookupBone(i))
local MdlBonePos,MdlBoneAng=FakeModel:GetBonePosition(FakeModel:LookupBone(i))
forgive me if I speak out of ignorance, because I haven’t work with BuildBonePositions much, but doesn’t that function require a couple of variables to be passed in?