Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i make an inventory script that show the items in a player's backpack?

I've been trying to make an inventory script that would show what the player had in a custom invenotry gui, but nothing i try seems to work. I was thinking it would be something like this.

local player = game.Players.LocalPlayer
local backpack = player.Backpack
local textbox = script.Parent.Textbox

for i,v in pairs(backpack:GetChildren()) do
	if v:IsA("Tool") then
		textbox.Text = v.Name
	end
end

2 comments

0

Looks good

0

If you want a free script, check in the toolbox for a freemodel

1 answer

Try this


local player = game.Players.LocalPlayer
local backpack = player.Backpack
local textbox = script.Parent.Textbox
while true do wait()
	for i,v in pairs(backpack:GetChildren()) do
    if v:IsA("Tool") then
	if string.find(textbox.text,v.Name) then
	else
		 textbox.Text = textbox.Text.." | "..v.Name
	end
       
    end
end
end

1 comment

0

But how would I make it show multiple items in the players backpack for multiple textboxes?

This discussion is preserved as it was. New answers, comments, and votes are closed.