• Get a bone as an entity
    1 replies, posted
Hey guys, I need your help. I'm working on a gamemode and I wanna add armor to it, so I look for bones. I found a command Entity:LookupBone() but this return an integer which is good for some command like Entity:GetBonePosition() but I wanna parent a prop or an entity to it. Any idea?
Bones are no entities, you can parent to attachments though. [lua] local function Parent_Hologram(holo, ent, bone, attachment) if ent:GetParent() and ent:GetParent():IsValid() and ent:GetParent() == holo.ent then return end holo.ent:SetParent(ent) if bone != nil then holo.ent:SetParentPhysNum(bone) end if attachment != nil then holo.ent:Fire("SetParentAttachmentMaintainOffset", attachment, 0.01) end end [/lua] Taken from the wiremod svn.
Sorry, you need to Log In to post a reply to this thread.