wowprogramming.com and wowpedia.org are two good sites.
You should be getting an error which is why you're seeing this behaviour so, you need to turn on "Display lua Errors" in the Interface\Help options or better yet get
BugGrabber and
BugSack
Anything local needs to be declared before it is called so in this case to create a toggle,
Code:
local UIConfig = CreateFrame("Frame", "MUI_BuffFrame", UIParent, "BasicFrameTemplateWithInset");
UIConfig:SetSize(50, 50)
UIConfig:ClearAllPoints()
UIConfig:SetPoint("CENTER")
SlashCmdList["RAIDLOCKREPORT"] = function()
DEFAULT_CHAT_FRAME:AddMessage("Working");
if not UIConfig:IsShown() then
UIConfig:Show()
else
UIConfig:Hide()
end
end
SLASH_RAIDLOCKREPORT1 = "/raidlockreport";
SLASH_RAIDLOCKREPORT2 = "/rlr";
Edit: Updated so you can see something.