Hello I am making a game that will count how many parts have been generated by instance.new. And I wanted to do it with a bool value.
local part = game.Workspace.Generator
local NumBlocks = game.StarterGui.ScreenGui.NumBlocks
local User = NumBlocks.Parent.User
local Rating = NumBlocks.Parent.Rating
local IntValue = game.ReplicatedStorage.IntValue
while true do
local LagPart = Instance.new("Part", game.Workspace)
LagPart.CFrame = LagPart.CFrame * part.CFrame
LagPart.Transparency = 1
IntValue.Value = IntValue.Value + 1
wait(0.1)
print(IntValue)
end
So basically after one part has been generated it will make the bool value go up by 1. But I get an error saying
ServerScriptService.Generator:11: attempt to perform arithmetic (add) on boolean and number
Please help me fix this. Did I do something wrong?

2 comments
lol a bool is true or false
change your bool value to a Int value. that should fix the problem