if you’re trying to hide nameplate names, forget SetCVar("nameplateShowNames", 0) and similar. It doesn’t exist in 3.3.5. ChatGPT’s isn't great for 3.3.5. It just doesn’t know the environment or API from back then so it spits out retail stuff most of the times..
Anyway, here’s your code. Enjoy!
local function HideNameplateNames()
local children = { WorldFrame:GetChildren() }
for _, child in ipairs(children) do
if child:IsShown() and child:GetName() == nil then
local regions = { child:GetRegions() }
for _, region in ipairs(regions) do
if region:IsObjectType("FontString") then
local text = region:GetText()
if text and not text:match("^%d+$") then
region:Hide()
end
end
end
end
end
end
local f = CreateFrame("Frame")
f:RegisterEvent("PLAYER_ENTERING_WORLD")
f:RegisterEvent("NAME_PLATE_UNIT_ADDED")
f:RegisterEvent("PLAYER_TARGET_CHANGED")
f:SetScript("OnEvent", function(self, event)
HideNameplateNames()
end)