How can I teleport all the items in my inventory to another location?

Question: How can I teleport all the items in my inventory to another location?
Issue: The script can teleport the actual item, but none of the item’s scripting is included. I cannot pick it up or do anything with it (even move it). I believe the item is anchored, but I don’t know how.
Solutions: I have attempted to try some coding including terms such as GetChildren, but I am a relatively inexperienced and novice scripter, so I’m really not sure how or if it is the right thing to do.

Hello! Any assistance I could get would be incredibly appreciated, thank you. This script was initially taken from a free teleportation pad model that allows you to use a proximity prompt to teleport yourself to another pad.
Note: The name of the tool in my inventory is “Gyoza,” a type of food.

for i,v in pairs(script.Parent:GetChildren()) do
    if v:IsA("BasePart") then
         v.ProximityPrompt.Triggered:Connect(function(player)
               player.Backpack.Gyoza.Parent = workspace
               workspace.Gyoza:MoveTo(V.Destination.Value.Position) 
          end)
     end
end

BONUS: Is there any way I could adapt this to work for all items in my inventory, even if they’re not all Goyzas.

Thank you!

Loop through player’s backpack and change all of their Parent property to wherever you want to move them to. For example:

for _,item in pairs(player.Backpack:GetChildren()) do
    item.Parent = workspace
end
1 Like

he already does that, he has an issue with tools not functioning when doing so.

Perhaps consider cloning a new instance and delete the old? I am not sure why it would stop functioning when changing parents.

1 Like

Yes, that’s my issue right now.

Thank you, this is very useful for the bonus part. However, I need to make the tool actually function.

Does the tool still work if you drop it i.e. backspace with tool equipped on character

1 Like

Yes. I can go towards it, pick it up, and use it completely normally.

Maybe try parenting all applicable tools to the character then to the designated workspace position

last resort if you don’t receive any other help–im not sure what else to do.