game.Players.PlayerAdded:Connect(function(player)
script.Parent.Handle.Interaction.Triggered:Connect(function()
local Tool = ReplicatedStorage.Tools.Chips:Clone()
for _,v in pairs(player.Character:GetChildren()) do
if v:IsA("Tool") then
print("Didn't pick up the tool! Inventory full")
end
end
for _,v in pairs(player.Backpack:GetChildren()) do
if v:IsA("Tool") then
print("Didn't pick up the tool! Inventory full")
end
end
if #player.Backpack:GetChildren() == 0 then
Tool.Parent = player.Backpack
script.Parent:Destroy()
game.ReplicatedStorage.Tools.Chips.Value += 1
end
end)
end)
every time i try and add 1 to an int value it gives me an error saying “Workspace.Tools.Chips.Script:25: attempt to perform arithmetic (add) on Instance and number”