I'm trying to make a inventory gui like booga booga but the gui won't clone it self to the gui when you collect a item and there's no error in the script.
script
game:GetService("ReplicatedStorage").ItemAmount.OnServerEvent:Connect(function(player) for i, item in pairs((player.Inventory:GetChildren())) do if (not player.PlayerGui.Inventory.InventoryFrame:FindFirstChild(item.Name)) then local clone = game:GetService("ServerStorage"):WaitForChild("Template") clone.Name = item.Name clone.ItemName.Text = item.Name clone.Count.Text = item.Value item:GetPropetryChangedSignal("Value"):Connect(function() clone.Count.Text = item.Value end) clone.Parent = player.PlayerGui.Inventory.InventoryFrame end end end)
You forgot to write :Clone()
at the end of line 04. Try this:
game:GetService("ReplicatedStorage").ItemAmount.OnServerEvent:Connect(function(player) for i, item in pairs((player.Inventory:GetChildren())) do if (not player.PlayerGui.Inventory.InventoryFrame:FindFirstChild(item.Name)) then local clone = game:GetService("ServerStorage"):WaitForChild("Template"):Clone() clone.Name = item.Name clone.ItemName.Text = item.Name clone.Count.Text = item.Value item:GetPropetryChangedSignal("Value"):Connect(function() clone.Count.Text = item.Value end) clone.Parent = player.PlayerGui.Inventory.InventoryFrame end end end)