Text stacking on top of each other usually means you are creating a new frame/fontstring each time you call the function when you want to re-use existing frames as much as possible. Something like:
Lua Code:
local f1 = CreateFrame("Frame",nil,UIParent)
f1:SetWidth(1)
f1:SetHeight(1)
f1:SetAlpha(.90);
f1:SetPoint("CENTER",650,-100)
f1.text = f1:CreateFontString(nil,"ARTWORK")
f1.text:SetFont("Fonts\\ARIALN.ttf", 13, "OUTLINE")
f1.text:SetPoint("CENTER",0,0)
f1:Hide()
local f2 = CreateFrame("Frame",nil,UIParent)
f2:SetWidth(1)
f2:SetHeight(1)
f2:SetAlpha(.90);
f2:SetPoint("CENTER",650,-100)
f2.text = f2:CreateFontString(nil,"ARTWORK")
f2.text:SetFont("Fonts\\ARIALN.ttf", 13, "OUTLINE")
f2.text:SetPoint("CENTER",0,0)
f2:Hide()
local function displayupdate(show, message)
if show == 1 then
f1.text:SetText(message)
f1:Show()
f2:Hide()
elseif show == 2 then
f2.text:SetText(message)
f2:Show()
f1:Hide()
else
f1:Hide()
f2:Hide()
end
end
displayupdate(1, "|cffffffffmyobjective1")
--or
displayupdate(2, "|cffffffffmyobjective2")
--or
displayupdate() -- to just hide both
--or possibly display both objectives in the one fontstring
displayupdate(1, "myobjective1\nmyobjective2")
--To use variables:
local objective1 = "myobjective1"
local objective2 = "myobjective2"
displayupdate(1, objective1.."\n"..objective2)
If you are just creating a mechanism to display a changing message then you probably only need one frame.