GIF of what happened: https://gyazo.com/e5b8e30e0bea28a54310217bf0ed858b
LocalScript that loads the trade in the incoming trade gui
local trade = game.ReplicatedStorage.Trade
local yourPlr = game.Players.LocalPlayer
local tradebox = script.Parent
local rs = game.ReplicatedStorage
trade.OnClientEvent:Connect(function(theirPlr,yourPlr,them,you)
script.Parent.Parent.Enabled = true
for i,v in pairs(them) do
if rs.Hats then
local hats = rs.Hats
if hats[v] then
if hats[v].ImageID then
tradebox.Them["Them"..i].Image = "rbxassetid://"..hats[v].ImageID.Value
tradebox.Them["Them"..i].InUse.Value = true
tradebox["ThemRap"..i].Text = hats[v].RecentAveragePrice.Value
tradebox.Them["Them"..i].ItemName.Value = v
end
end
end
end
for i,v in pairs(you) do
if rs.Hats then
local hats = rs.Hats
if hats[v] then
if hats[v].ImageID then
tradebox.You["You"..i].Image = "rbxassetid://"..hats[v].ImageID.Value
tradebox.You["You"..i].InUse.Value = true
tradebox["YouRap"..i].Text = hats[v].RecentAveragePrice.Value
tradebox.You["You"..i].ItemName.Value = v
end
end
end
end
end)
local script that is sending the information
local trade = game.ReplicatedStorage.Trade
local them = script.Parent.Parent.ThemItemsMain
local you = script.Parent.Parent.YouItemsMain
local plr = game.Players.LocalPlayer
local themItems = {}
local youItems = {}
script.Parent.MouseButton1Click:Connect(function()
for i,v in pairs(them:GetChildren()) do
table.insert(themItems,i,v:GetAttribute("ItemName").Value)
end
for i,v in pairs(you:GetChildren()) do
table.insert(youItems,i,v:GetAttribute("ItemName").Value)
end
for i,v in pairs(themItems) do
print(v)
end
for i,v in pairs(youItems) do
print(v)
end
trade:FireServer(plr,plr,themItems,youItems)
script.Parent.Parent.Parent.Enabled = false
end)
script that processes the trade (server)
local trade = game.ReplicatedStorage.Trade
trade.OnServerEvent:Connect(function(plr,plr1,plr2,items1,items2)
trade:FireClient(plr,plr1,plr2,items1,items2)
end)
why don’t the images pop up when the second gui loads (incoming trade gui) it doesnt error anything