Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
Zrxiis 26
7 years ago

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
0
Looks good Validark 1580 — 7y
0
If you want a free script, check in the toolbox for a freemodel Validark 1580 — 7y

1 answer

Log in to vote
-1
Answered by 7 years ago

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

0
But how would I make it show multiple items in the players backpack for multiple textboxes? Zrxiis 26 — 7y
Ad

Answer this question