the script runs before the imagebutton enters slots.. it skips function MouseHover()
local gui = script.Parent local slots = gui.Frame.ScrollingFrame.FrameH local hats = slots:GetChildren() local item = gui.Frame.item function findfirstchild(slots) if slots.Name == "a1" then for i = 1,#hats do hats[i].MouseEnter:connect(function() function MouseHover() wait() item.ImageLabel.Image = "http://www.roblox.com/Thumbs/Asset.ashx?format=png&width=420&height=420&assetId="..hats[i].id.Value.."" MouseHover() end print("successful") end) end end end