Ok so essentially I have a folder inside of a player that is their inventory its a custom folder not the roblox default one. I have to get the children in the folder then create a frame for each one but how can I do that. Also I each frame has a value called "WeaponName" so that they can get seperated from other frames. No fancy positioning or anything required as it is already in a uilistlayout in a larger scrolling frame.
I have this script right now and in my mind it works but for some reason it doesnt in game. I go into server mode and put a part in the players inventory folder however it does not clone the frame and change the frames parent why?
Its a local script inside of the scrollingframe:
while true do
wait(1)
local player = game.Players.LocalPlayer
local children = player.Inventory:GetChildren()
print(#children)
for i, child in ipairs(children) do
local weaponframe = script.Parent.Parent.Frame:Clone()
weaponframe.Parent = script.Parent
weaponframe.WeaponName.Value = children:GetChildren()[1].Name
end
endeaponframe.WeaponName = child[1].Name
end
