so The reason why my script isn't working is because the (function(plr) isn't finding the players name so when it goes to set the items text but it doesn't know the players name to set the SlotUsed to Taken and the ItemName to Bottle Water
script.Parent.ClickDetector.MouseClick:connect(function(plr) if plr.PlayerGui.Inventory.Frame.Item1.SlotUsed.Value == "NonTaken" then plr.PlayerGui.Inventory.Frame.Item1.ItemName.Value = "Bottle Water" elseif plr.PlayerGui.Inventory.Frame.Item1.SlotUsed.Value == "Taken" and plr.PlayerGui.Inventory.Frame.Item2.SlotUsed.Value == "Nontaken" then plr.PlayerGui.Inventory.Frame.Item2.ItemName.Value = "Bottle Water" elseif plr.PlayerGui.Inventory.Frame.Item2.SlotUsed.Value == "Taken" and plr.PlayerGui.Inventory.Frame.Item3.SlotUsed.Value == "NonTaken" then plr.PlayerGui.Inventory.Frame.Item3.ItemName.Value = "Bottle Water" elseif plr.PlayerGui.Inventory.Frame.Item3.SlotUsed.Value == "Taken" and plr.PlayerGui.Inventory.Frame.Item4.SlotUsed.Value == "NonTaken" then plr.PlayerGui.Inventory.Frame.Item4.ItemName.Value = "Bottle Water" elseif plr.PlayerGui.Inventory.Frame.Item4.SlotUsed.Value == "Taken" and plr.PlayerGui.Inventory.Frame.Item5.SlotUsed.Value == "NonTaken" then plr.PlayerGui.Inventory.Frame.Item5.ItemName.Value = "Bottle Water" elseif plr.PlayerGui.Inventory.Frame.Item5.SlotUsed.Value == "Taken" then script.Parent:Destroy() end end)