Im trying to that when i click on the item, it will show info on the right side. Click this for pic of GUI
Here is my code for shop GUI:
local ShopTemplates = script.ShopTemplates local ShopInfoTmp = script.ShopInfo local ShopTemplateChildren = ShopTemplates:GetChildren() local ShopInfoChildrenTmp = ShopInfoTmp:GetChildren() local ShopFrame = menuFrames.Shop local ShopList = ShopFrame.Items local ShopInfoChildren = menuFrames.Shop.ItemInfo:GetChildren() local ShopListChildren = ShopFrame.Items:GetChildren() for i, v in pairs(ShopTemplateChildren) do local itemClone = v:Clone() itemClone.Parent = ShopList end for index = 1, #ShopListChildren do local ListItem = ShopListChildren[index] if ListItem.Name ~= "UIListLayout" then ListItem.Button.MouseButton1Down:Connect(function() for i, v in pairs(ShopInfoChildren) do v:Destroy() end local infoFor = ShopInfoTmp[ListItem.Name] if infoFor then local inforTmpClone = infoFor:Clone() inforTmpClone.Parent = ShopFrame.ItemInfo end end) end end
But the MouseButton1Down Function dosent do anything. No errors either. It just does nothing. Can someone help me?