I've tried changing it from a regular script to a Localscript but that still does absolutely nothing there are no errors in the Dev Console
the script is for a ClickDetector which is interacting with a Gui (Inventory Gui picking up items)
its being stupid and my Online game won't work for crap!
Here's the script
script.Parent.ClickDetector.MouseClick:connect(function(plr) script.Parent:FindFirstChild("PlrName").Value = plr.Name local plrgui = game.Players:FindFirstChild(script.Parent:FindFirstChild("PlrName").Value).PlayerGui if plrgui.Inventory.Frame.Slot1.Item.Value == "" then plrgui.Inventory.Frame.Slot1.Item.Value = script.Parent.Name script.Parent:Destroy() elseif plrgui.Inventory.Frame.Slot2.Item.Value == "" then plrgui.Inventory.Frame.Slot2.Item.Value = script.Parent.Name script.Parent:Destroy() elseif plrgui.Inventory.Frame.Slot3.Item.Value == "" then plrgui.Inventory.Frame.Slot3.Item.Value = script.Parent.Name script.Parent:Destroy() elseif plrgui.Inventory.Frame.Slot4.Item.Value == "" then plrgui.Inventory.Frame.Slot4.Item.Value = script.Parent.Name script.Parent:Destroy() elseif plrgui.Inventory.Frame.Slot5.Item.Value == "" then plrgui.Inventory.Frame.Slot5.Item.Value = script.Parent.Name script.Parent:Destroy() elseif plrgui.Inventory.Frame.Slot6.Item.Value == "" then plrgui.Inventory.Frame.Slot6.Item.Value = script.Parent.Name script.Parent:Destroy() end end)
local Obj = script.Parent Obj.ClickDetector.MouseClick:connect(function(plr) Obj:FindFirstChild('PlrName').Value = plr.Name local PlrGUI = game.Players:FindFirstChild(plr.Name).PlayerGui if PlrGUI then local MaxSlots = {1,2,3,4,5,6} for _, v in pairs(MaxSlots) do local vx = PlrGUI.Inventory.Frame:FindFirstChild("Slot" .. tostring(v)) if vx and vx.Item.Value == "" then vx.Item.Value = Obj.Name Obj:Destroy() break end end end end)
What that does is checks if the part is clicked if so then it adds the player's name to the PlrName then it loops through the Inventory and checks the slots, in the MaxSlots table you can add how many slots you want, I just made it six because I see in your code its six.