Inventory System not working. (Incrementing Attributes part not working)

Hello! I am creating an inventory system. However, it is not working.

	local Inventory ="Folder")
	Inventory.Parent = Player
	Inventory.Name = "Inventory"
	local BinaryStringValue ="BinaryStringValue")
	BinaryStringValue.Parent = Player
	BinaryStringValue.Name = "InventoryData"
	BinaryStringValue:SetAttribute("MaxItems", 5)
	BinaryStringValue:SetAttribute("CurrentItems", 0)

game.ReplicatedStorage.AddItemToQueue.Event:Connect(function(Player, Name, ImageId, PhysicalObject)
	if Player.InventoryData:GetAttribute("MaxItems") <= Player.InventoryData:GetAttribute("CurrentItems") then
		PhysicalObject.Parent = Player.Inventory
		Player.InventoryData:SetAttribute("CurrentItems", Player.InventoryData:GetAttribute("CurrentItems") + 1)
		game.ReplicatedStorage.ItemAdded:FireClient(Player, Name, ImageId)
		game.ReplicatedStorage.DialogReplicated.SettingsServer:FireClient(Player, "Huh? My pockets are full. I cannot add ".. Name .." to my pockets.", nil, "", false, false)

The limit of temporary test number 5 is not working. What is not working is incrementing the attributes. I tried my little IncrementAttribute function, but it doesn’t work. If you can help, please let me know. Thanks! WE

How come you are using a BinaryStringValue?

Because its a square, and I use Attributes, and its a blank and light weight instance.

Found out I was using the RemoteEvent and not the function. Oops!