Anyone able to tell me why this isnt working?
Code:local AutoSheathAfterCombat_EventFrame = CreateFrame("Frame") AutoSheathAfterCombat_EventFrame:RegisterEvent("PLAYER_LEAVE_COMBAT") AutoSheathAfterCombat_EventFrame:SetScript("OnEvent", function(self, event, ...) if (GetSheathState() ~= 0) then ToggleSheath() end end end)