PlayerFrame:SetPoint and TargetFrame:SetPoint does not work from addon

Hi, wrote a simple addon, which automatically brings the Target and PlayerFrame into position. This somehow stopped working after updating windows some time ago

– Player and target frame
PlayerFrame:ClearAllPoints();
PlayerFrame:SetScale(1.2);
PlayerFrame:SetUserPlaced(true);

– Player and target frame
TargetFrame:ClearAllPoints();
TargetFrame:SetScale(1.2);
TargetFrame:SetUserPlaced(true);

– TODO does not work anymore!
PlayerFrame:SetPoint(“CENTER”, -150,-150);
TargetFrame:SetPoint(“CENTER”, 150, -150);

Works for me. Are you trying to do this in combat? PlayerFrame is proteced.
https://wow.gamepedia.com/API_Region_SetPoint

No it’s done on AddonLoad. It’s the actual content of the .lua file.|

myaddon.toc
myaddon.lua

and myaddon.lua contains the lines of code mentioned above

Does it work when you enter this into the console?
/run PlayerFrame:ClearAllPoints(); PlayerFrame:SetPoint(“CENTER”, -150,-150);

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.