if trade.Player1Offerings:FindFirstChild("Item") then
if trade.Player1Offerings:FindFirstChild("Item") ~= nil then
trade.P1Offer = getInvTable(tbl.Player1Offerings)
else
trade.P1Offer = "none"
end
end
So it basically checks if it exists and then it checks if it is nil
This is because you didn’t check if Player1Offerings exist or not, you should check if it exists first, because the scripts can sometimes run before it creates the offerings ui
if trade:FindFirstChild("Player1Offerings") then
if trade.Player1Offerings:FindFirstChild("Item") then -- This is the same as checking if it is not = to nil
trade.P1Offer = getInvTable(tbl.Player1Offerings)
else
trade.P1Offer = "none"
end
end