View Single Post
08-06-18, 12:45 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
You need to wait until these frames are setup before you can hide anything. Try this:
Lua Code:
  1. local f = CreateFrame("Frame")    --we need a frame to listen for an event
  2. f:RegisterEvent("PLAYER_ENTERING_WORLD")   --we'll listen for this event - all the UI stuff should be done loading by now
  3. f:SetScript("OnEvent", function(self, event)   --when the event fires we want this to happen
  4.      PlayerFrameTexture:Hide()
  5.      PetFrameManaBar:Hide()
  6. end)

Put the above into your Lua file, or you can use this to make your addon instead: https://addon.bool.no/
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote