Have you tried changing the script to:
Lua Code:
if pressed then
if self:IsVisible() then
self:Hide()
else
self:Show()
end
end
to ensure that there isn't a problem with the reference to the frame?
Do you have any other scripts set? Is the chat background parented to a frame other than UIParent? Are any other frames parented or anchored to the chat background?