I want to be able to trade my Items from the Inventory but when the TradingFrame openes it only shows for 1 peerson and that’s because I changed Backpack to Inventory in tzhe small script Ima show now and it gives me an error:
Model:SetPrimaryPartCFrame() failed because no PrimaryPart has been set, or the PrimaryPart no longer exists. Please set Model.PrimaryPart before using this.
local config = {}
-------Settings you can change-------
config.MaxSlots = 6
config.TimeBeforeTradeConfirmed = 5
-------------------------------------
--Funcion for getting all the tools a player has
function config.GetTools(plr)
local plrTools = plr.Inventory:GetChildren()
local toolEquipped = plr.Character:FindFirstChildOfClass("Tool")
if toolEquipped then
table.insert(plrTools, toolEquipped)
end
return plrTools
end
return config
and this is the part of the error:
toolModel.PrimaryPart = toolModel:FindFirstChild("Handle") or toolModel:FindFirstChildOfClass("BasePart", true)
toolModel:SetPrimaryPartCFrame(CFrame.new(0, 0, -3))