self:SetSize(CastingBarFrame:GetWidth(), CastingBarFrame:GetHeight()) self:SetBackdropColor(0, 1, 0, 0.5) self.text = _G[self:GetName().."Pos"] self.UpdatePosition = function(self) local x, y = self:GetLeft(), self:GetBottom() if x and y then self.text:SetText(("Left: %d Bottom: %d"):format(x , y)) end end self:UpdatePosition()