I know I've seen these questions all around but I can't find any that would help my problem. This is the function that is getting the error:

local function shoot()
	if CanShoot(player, true) then return end
	lastShot = tick()
	AmmoValue.Value = AmmoValue.Value - 1
	
end

I assume its the player. And then this is the CanShoot() function:

local function canShoot(Plr)
	if math.abs(lastShot - tick()) > (60/FireRateValue.Value) then
			if not Reloading then
				if Equipped then
					if AmmoValue.Value > 0 then
				else
					
					end
				end
			end
			end
			return false
end

Not really sure what went wrong. Any help would be great, thank you!