Attempt to perform arithmetic (add) on boolean and number

Hi guys, I have been working on an update for my game and I came across an error. It will be highly appreciated if you can help me out!

ServerScript:

-- POINT Achievements
	
	local Config = 10e6
	local Config2 = 100e6
	local Config3 = 150e9
	local Config4 = 625e12
	local Config5 = 10e21
	local Config6 = 100e24
	local Config7 = 1e30
	local Config8 = 1e33
	
	--Rebirth Config
	
	local Config9 = 100
	local Config10 = 1000
	local Config11 = 25000
	local Config12 = 150e4
	
	if multi.Value >= Config then
		if Point1.Value == false then
			Points.Value +=1
			Point1.Value = true
		end
	end
	
	if multi.Value >= Config2 then
		if Point2.Value == false then
			Points.Value +=2
			Point2.Value = true
			end
	end

I am making an achievement reward system that will reward you points to buy upgrades by earning enough Multiplier/Rebirths, The error is coming from the “Points.Value+=1”
Everyone that replies to me gets a free heart!

1 Like

Can you please provide the full script, clearly ‘Points’ is a boolean.

1 Like

What error is being shown? Points can be nil, I need the full code

1 Like

` Server script:

game.Players.PlayerAdded:Connect(function(plr)
	--Character
	local Char = plr.Character or plr.CharacterAdded:Wait()
	--Code
	local s = Instance.new("Folder",plr)
	s.Name = "Stats"

local DS = Instance.new("Folder",plr)
	DS.Name = "DataS"

    local Points = Instance.new("NumberValue",DS) 
    	Points.Name = "Points"
    	Points.Value = 0

local multi = Instance.new("NumberValue",s) -- multi stat
	multi.Name = "Multiplier"

--Point achievement Valeus
	local Point1 = Instance.new("BoolValue",DS) 
	Point1.Name = "Point1"
	Point1.Value = false
	
	local Point2 = Instance.new("BoolValue",DS) 
	Point2.Name = "Point2"
	Point2.Value = false
	
	local Point3 = Instance.new("BoolValue",DS)
	Point3.Name = "Point3"
	Point3.Value = false
	
	local Point4 = Instance.new("BoolValue",DS)
	Point4.Name = "Point4"
	Point4.Value = false

while wait(0) do
-- POINT Achievements
	
	local Config = 10e6
	local Config2 = 100e6
	local Config3 = 150e9
	local Config4 = 625e12
	local Config5 = 10e21
	local Config6 = 100e24
	local Config7 = 1e30
	local Config8 = 1e33
	
	--Rebirth Config
	
	local Config9 = 100
	local Config10 = 1000
	local Config11 = 25000
	local Config12 = 150e4
	
	if multi.Value >= Config then
		if Point1.Value == false then
			Points.Value +=1
			Point1.Value = true
		end
	end
	
	if multi.Value >= Config2 then
		if Point2.Value == false then
			Points.Value +=2
			Point2.Value = true
			end
	end
end

EDIT: ignore this message please

1 Like

Can i know how i can fix this issue?

You keep changing Points.Value between a boolean (true/false) and numbers. Stick one to what you want to use.

2 Likes

don’t worry about that, I thought I deleted it earlier
I gotta wait 11 hours before I can delete smth

1 Like