Help with hiding player status text

I run this on live and all it does is hides status text of player, pet and focus frame unless you mouse over them, and I was hoping someone could help me get it working on classic as well

  local function alphaText(self,alpha)
      local stub = (self:GetName() or ""):match("(.-Frame)")
      if stub then
        _G[stub.."HealthBar"].TextString:SetAlpha(alpha)
        _G[stub.."ManaBar"].TextString:SetAlpha(alpha)
      end
    end
    local function showText(self)
      alphaText(self,1)
    end
    local function hideText(self)
      alphaText(self,0)
    end
    local function hookFrame(frameName)
      _G[frameName]:HookScript("OnEnter",showText)
      _G[frameName]:HookScript("OnLeave",hideText)
      _G[frameName.."HealthBar"]:HookScript("OnEnter",showText)
      _G[frameName.."HealthBar"]:HookScript("OnLeave",hideText)
      _G[frameName.."ManaBar"]:HookScript("OnEnter",showText)
      _G[frameName.."ManaBar"]:HookScript("OnLeave",hideText)
      hideText(_G[frameName])
    end
    hookFrame("PlayerFrame")
    hookFrame("PetFrame")
    hookFrame("FocusFrame")

You’re probably getting an error because Classic doesn’t have a FocusFrame.

Got it working, all it needed was a toc update, but yeah I removed the hook for focus frame.