when you click the part it's meant to affect the gui / slot
an error shows up when i start a local server but not when in normal studio
script.Parent.MouseClick:Connect(function(plr)
slotNumber = slotNumber + 1
slotName = "slot" .. slotNumber
slot = plr.Parent.PlayerGui.Inventory.bg:FindFirstChild(slotName)
slott = plr.Parent.PlayerGui.Inventory.bg:FindFirstChild(script.Parent.Parent.itemName.Value)
sslott()
end)
the error message is : 19:27:44.602 - PlayerGui is not a valid member of Players
Thanks

1 comment
That should work.