Hey so basically im trying to make this system where I transfer two items between backpacks. I have an UI for staff members to type a username when they have an item equipped, and then the script is supposed to take that item and transfer it to the target’s inventory.
My code is linked below, I don’t get any errors at all, but the item is not sent to the target. Thanks!
UsernameBox.FocusLost:Connect(function(enterpressed)
local username = UsernameBox.Text
local Target = game.Players:FindFirstChild(username)
local EquippedItem = character:FindFirstChildWhichIsA('Tool') or character:FindFirstChildWhichIsA('Model')
if EquippedItem and Target then
EquippedItem = Target.Backpack
else
error('Player didnt have a valid equipped item or missing a valid username')
end
end)