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

How to make a ui button for every item in backpack?

Asked by 3 years ago
Edited 3 years ago

im trying to make an inventory system and im trying to make it so: if a player owns a tool it will be in the backpack if its in the backpack the button with the same name will be visible

the problem: on child added doesnt work

this is what i have so far:

local script inside StarterGui.Inventory.MainFrame.Menu.ScrollingFrame

01local player = game.Players.LocalPlayer
02local backpack = player.Backpack
03 
04function togglebutton(name)
05    local ui = script.Parent
06    for i,v in pairs(ui:GetChildren()) do
07        if v.Name == name then
08            v.Visible = true
09        end
10    end
11end
12 
13function dostuff()
14    for i,v in pairs(player.Backpack:GetChildren()) do
15        if v:IsA("Tool") then
View all 22 lines...
0
Fixed most of it. just need to find out why child added doesnt work MightBeAHaxxer 24 — 3y
0
Solved. please dont help. its useless now! MightBeAHaxxer 24 — 3y

Answer this question