Parenting props to a player.

How would I go about parenting a prop to a player, lets say I want to parent a piece of metal to the players face, how would I do this. And how can I parent it to other parts of the body.

[lua]
attachments = {
“ValveBiped.Bip01_Pelvis”,
“ValveBiped.Bip01_Spine”,
“ValveBiped.Bip01_Spine1”,
“ValveBiped.Bip01_Spine2”,
“ValveBiped.Bip01_Spine4”,
“ValveBiped.Bip01_Neck1”,
“ValveBiped.Bip01_Head1”,
“ValveBiped.forward”,
“ValveBiped.Bip01_R_Clavicle”,
“ValveBiped.Bip01_R_UpperArm”,
“ValveBiped.Bip01_R_Forearm”,
“ValveBiped.Bip01_R_Hand”,
“ValveBiped.Anim_Attachment_RH”,
“ValveBiped.Bip01_L_Clavicle”,
“ValveBiped.Bip01_L_UpperArm”,
“ValveBiped.Bip01_L_Forearm”,
“ValveBiped.Bip01_L_Hand”,
“ValveBiped.Anim_Attachment_LH”,
“ValveBiped.Bip01_R_Thigh”,
“ValveBiped.Bip01_R_Calf”,
“ValveBiped.Bip01_R_Foot”,
“ValveBiped.Bip01_L_Thigh”,
“ValveBiped.Bip01_L_Calf”,
“ValveBiped.Bip01_L_Foot”,
“ValveBiped.Bip01_R_Wrist”,
“ValveBiped.Bip01_L_Wrist”,
“ValveBiped.Bip01_L_Ulna”,
“ValveBiped.Bip01_R_Ulna”,
}
[/lua]

That’s a bone table i have from one of my old scripts if it’s of any use to you… Get the bone position and the angles parent it to the player set its pos and angles to the bone pos and bone angles( Better to do it in the entities Draw() function seeing as it wont exactly be collide-able )

Can you give me a example code?

Also how would I get a bone on a player, and get it’s angles and pos.

Basically that list isn’t helping me, I need to know how, that just tells me where I can attach them when I learn how.

[lua]
local bone
local ply
local pos,ang
function ENT:Draw()
ply = self:GetOwner() or self:GetOwner():GetRagdollEntity()
if not( IsValid( ply ) ) then return end;
bone = ply:LookupBone(“ValveBiped.Bip01_Head1”); – Head.
if not bone then return end
pos, ang = ply:GetBonePosition(bone)

self:SetPos(pos) – Add or Subtract if you want to place it somewhere else along the bonepos.
self:SetAngles(angles) – If you want an offset write yourself a method of retrieveing one.

self:DrawModel() – Might want to check it doesn’t block the players view.
end
[/lua]
Untested but you get the point.

Okay so, I’m going to make a entity and attempt to do this, mind adding me to steam?