I have this code:
local player = game.Players.LocalPlayer local ItemGui = script.Parent.Item local ObjectName = script.Parent.Item.ItemName player.Inventory.ChildAdded:Connect(function(child) ItemGui:Clone() ItemGui.Parent = script.Parent ObjectName.Text = child.Name end)
but it won't clone the frame. Can someone help me?
Try this:
local player = game.Players.LocalPlayer local ItemGui = script.Parent.Item local ObjectName = script.Parent.Item.ItemName player.Inventory.ChildAdded:Connect(function(child) local clonegui = ItemGui:Clone() clonegui.Parent = script.Parent ObjectName.Text = child.Name end)
also it doesn't work because you're supposed to make it a var.