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
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