What is the error you get and when do you get it? Without any error message it's hard to see what is wrong.
If you want to disable hte animations try this:
Lua Code:
if (control and not control.animation) then
--[[
control.animation = ANIMATION_MANAGER:CreateTimelineFromVirtual("IconSlotMouseOverAnimation", control)
control.animation:GetFirstAnimation():SetEndScale(1)
]]
end