If you're trying to add role, etc. icons onto your unit frames you can just use the built-in ones for oUF.
https://github.com/oUF-wow/oUF/blob/...rindicator.lua
Code:
-- Position and size
local LeaderIndicator = self:CreateTexture(nil, 'OVERLAY')
LeaderIndicator:SetSize(16, 16)
LeaderIndicator:SetPoint('BOTTOM', self, 'TOP')
-- Register it with oUF
self.LeaderIndicator = LeaderIndicator
Go up 1 tree to:
https://github.com/oUF-wow/oUF/tree/master/elements and there's the other built-in elements for oUF.