local item1 = itemFrame:WaitForChild("Item1")
local box
local numRows = 1
local iterations = 0
for i = 1,availableItems,1 do
if selectedtab == 1 then
if i == 1 then
box = item1
else
box = item1:Clone()
box.Name = "Item"..i
box.Parent = itemFrame
iterations = i
if (i-1) / (4*numRows) == 1 then
numRows = numRows + 1
box.Position = UDim2.new(PADDING_X,0,box.Position.Y.Scale,0) + UDim2.new(0,0,DROPDOWN_Y*(numRows-1),0)
else
box.Position = itemFrame["Item"..(i-1)].Position + UDim2.new(DROPDOWN_X,0,0,0)
end
itemFrame["Item"..i].ItemName.Text = availableTools[i][1]
print(box)
end
end
end
for i = 1,availableEmotes,1 do
if selectedtab == 2 then
if i == 1 then
box = item1
else
box = item1:Clone()
box.Name = "Item"..i
box.Parent = itemFrame
if (i-1) / (4*numRows) == 1 then
numRows = numRows + 1
box.Position = UDim2.new(PADDING_X,0,box.Position.Y.Scale,0) + UDim2.new(0,0,DROPDOWN_Y*(numRows-1),0)
else
box.Position = itemFrame["Item"..(i-1)].Position + UDim2.new(DROPDOWN_X,0,0,0)
end
itemFrame["Item"..i].ItemName.Text = availableEmotes[i][1]
print(box)
box.MouseButton1Click:Connect(function()
print("clicked")
if selectedtab == 2 then
gui.Click:Play()
local equipped = itemInformation.EquippedEmote
local owned = game.ReplicatedStorage.EmoteCheck:InvokeServer(availableEmotes[i][6])
if equipped.Value == availableTools[i][1] then
infoFrame.Cash.Text = "Owned"
infoFrame.BuyButton.Text = "Unequip"
elseif owned == true then
infoFrame.BuyButton.Text = "Equip"
infoFrame.Cash.Text = "Owned"
else
infoFrame.BuyButton.Text = "Buy"
infoFrame.Cash.Text = "$"..availableEmotes[i][2]
end
infoFrame.ItemName.Text = availableEmotes[i][1]
selectedEmote.Value = availableEmotes[i][6]
for _, v in pairs(itemFrame:GetChildren()) do
if v:IsA("ImageButton") then
v.BorderSizePixel = 0
end
end
end
end)
end
end
end
st.Changed:Connect(function()
for i,v in pairs(itemFrame:GetChildren()) do
v:Destroy()
end
local temp = mainFrame.Item1:Clone()
temp.Parent = itemFrame
temp.Visible = true
item1 = temp
i = 0
box = nil
numRows = 1
for i = 1,numberOfItems,1 do
if selectedtab == 1 then
if i == 1 then
-- Starting, so fill in Item1
box = item1
else
box = item1:Clone()
box.Name = "Item"..i
box.Parent = itemFrame
if (i-1) / (4*numRows) == 1 then
numRows = numRows + 1
box.Position = UDim2.new(PADDING_X,0,box.Position.Y.Scale,0) + UDim2.new(0,0,DROPDOWN_Y*(numRows-1),0)
else
box.Position = itemFrame["Item"..(i-1)].Position + UDim2.new(DROPDOWN_X,0,0,0)
end
itemFrame["Item"..i].ItemName.Text = availableTools[i][1]
print(box)
end
end
end
end)
st.Changed:Connect(function()
for i,v in pairs(itemFrame:GetChildren()) do
v:Destroy()
end
local temp = mainFrame.Item1:Clone()
temp.Parent = itemFrame
temp.Visible = true
item1 = temp
i = 0
box = nil
numRows = 1
for i = 1,numberOfEmotes,1 do
if selectedtab == 2 then
if i == 1 then
-- Starting, so fill in Item1
box = item1
else
box = item1:Clone()
box.Name = "Item"..i
box.Parent = itemFrame
if (i-1) / (4*numRows) == 1 then
numRows = numRows + 1
box.Position = UDim2.new(PADDING_X,0,box.Position.Y.Scale,0) + UDim2.new(0,0,DROPDOWN_Y*(numRows-1),0)
else
box.Position = itemFrame["Item"..(i-1)].Position + UDim2.new(DROPDOWN_X,0,0,0)
end
itemFrame["Item"..i].ItemName.Text = availableEmotes[i][1]
print(box)
box.MouseButton1Click:Connect(function()
print("clicked")
if selectedtab == 2 then
gui.Click:Play()
local equipped = itemInformation.EquippedEmote
local owned = game.ReplicatedStorage.EmoteCheck:InvokeServer(availableEmotes[i][6])
if equipped.Value == availableTools[i][1] then
infoFrame.Cash.Text = "Owned"
infoFrame.BuyButton.Text = "Unequip"
elseif owned == true then
infoFrame.BuyButton.Text = "Equip"
infoFrame.Cash.Text = "Owned"
else
infoFrame.BuyButton.Text = "Buy"
infoFrame.Cash.Text = "$"..availableEmotes[i][2]
end
infoFrame.ItemName.Text = availableEmotes[i][1]
selectedEmote.Value = availableEmotes[i][6]
for _, v in pairs(itemFrame:GetChildren()) do
if v:IsA("ImageButton") then
v.BorderSizePixel = 0
end
end
end
end)
end
end
end
end)
I'm trying to create a second tab for the emotes. When you click on the buttons, an information panel will appear on the right. But that doesn't happen. Here's a GIF:
https://i.gyazo.com/75ab99db3b1d33610b49c270536466c0.mp4
I can switch tabs, but when I press the boxes, nothing appears on the sidebar. You can also see the "Example", which is supposed to be "RustySword". This is what's printed into the console:
http://prntscr.com/nnng97 (Self-explanatory.)
These are some of the locals which are important.
local availableTools = game.ReplicatedStorage:WaitForChild("GetTools"):InvokeServer()
local availableEmotes = game.ReplicatedStorage:WaitForChild("GetEmotes"):InvokeServer()
local numberOfItems = #availableTools
local numberOfEmotes = #availableEmotes
The RemoteFunctions work. numberOfItems and numberOfEmotes returns the amount of tools/emotes.

3 comments
Check the z indexes or make sure there's not something in front of the gui buttons
Nothing is in-front of them.
Copied from the mining shop simulator series, you must post your own attempt. Not a copied script https://www.youtube.com/watch?v=7Bn1KfDDQu0