Im trying to create a panel that toggles on and off based on if i have a target or not. I just can't seem to get it to work.
Im using:
Code:
if (event == PLAYER_TARGET_CHANGED) then
if (UnitExists("target")) then
Target_Power:Show()
else
Target_Power:Hide()
end
end
Baisicly i whant the panel to only be shown when i have a target.
What am i doing wrong?