Parent to Bone during Runtime?

Is it possible to parent an object to a specific bone of an armature during runtime?

ok nvm… just came up with a solution

i can have objects parented to each bone and then parent to these objects