local Inventory = game.Players.LocalPlayer.Data:WaitForChild("Inventory"):GetChildren()
local number = 0
local children = 0
for i = 1, #Inventory do
if Inventory[i].Type.Value == "Weapon" then
children = #Inventory
local new = Instance.new("TextLabel")
new.Parent = script.Parent
new.Position = position + UDim2.new(0,0,0,30)
position = position + UDim2.new(0,0,0,30)
new.Size = UDim2.new(0,200,0,25)
new.ZIndex = 2
new.Text = Inventory[i].Name
number = number + 1
if number == children then
im trying to make this script get only the Types with Weapons in it. but its getting all the children, instead of just 2, it's 3. this is the first working script except for the values. i have tried different changes but they're gone because i don't save it unless it works.
