Need help LUA

hello there im working on a private project and im stuck not too sure what to do looking for someone to help/menthor not super complicated but wow lua knowledge is needed TYVM! :smiley:

add my discord Dheal#5228
SKYPE : miniminho278

You will probably get more help if you ask your questions here and let the answers be “open” for others that might also be wanting to do similar things, or different things with a similar approach or…

ok fizz i just want to keep this private so ill be vague here’s what i want to do, this gets triggered by events

       ty:SetWidth(1) 
	ty:SetHeight(1) 
	ty:SetAlpha(.90);
	ty:SetPoint("CENTER",650,-100)
	ty.text =ty:CreateFontString(nil,"ARTWORK") 
	ty.text:SetFont("Fonts\\ARIALN.ttf", 13, "OUTLINE")
        ty.text:SetPoint("CENTER",0,0)
	ty.text:SetText(storedValue*2)

my problem is each time the value is changed instead of dissapearing it stacks ontop of the last value making it impossible to read id like it to display 4 latest value under eachother not 100% where to get started on this tips/help would be apreciated

Best guess:
ty.text =ty:CreateFontString(nil,"ARTWORK")
This is being run each time creating a new FontString on top of the previous FontStrings.

if not ty.text then
    ty.text = ty:CreateFontString(nil,"ARTWORK")
end  

In all likelyhood everything other than the SetText only needs to be run the first time code is called but it’s a bit hard to tell.

if not ty.text then
	ty:SetWidth(1) 
	ty:SetHeight(1) 
	ty:SetAlpha(.90)
	ty:SetPoint("CENTER", 650, -100)
	ty.text = ty:CreateFontString(nil, "ARTWORK") 
	ty.text:SetFont("Fonts\\ARIALN.ttf", 13, "OUTLINE")
	ty.text:SetPoint("CENTER")
end
ty.text:SetText(storedValue*2)
1 Like

ahhh i see make sense tried it and worked thanks alot +1

should add me fizz :smiley: