MPU-9250 magnetometer returning zero values

Hi, I recently got a MPU-9250 and hooked it up to an Uno R3 board. When I read values from the accelerometer and gyroscope, the sensor seems to be working fine, however when I try to read values from the magnetometer, I am just getting a bunch of zeroes. This is my code, its pretty much identical to the code from the accelerometer so I'm not sure what I am doing wrong. When I output the value of status to the serial monitor, it gives me status error: -14.

/*

*/
#include "MPU9250.h"
#include <Wire.h>
MPU9250 IMU(Wire, 0x68);
int status; 

void setup() {
    Serial.begin(9600);
    status = IMU.begin();  
   
  }
    


void loop() {
  IMU.readSensor();
 
  float magx = IMU.getMagX_uT();
  float magy = IMU.getMagY_uT();
  float magz = IMU.getMagZ_uT();
  
  Serial.print(magx);
  Serial.print("   ");
  Serial.print(magy);
  Serial.print("   ");
  Serial.print(magz);
  Serial.println("");
  delay(1000);
}

Thank you for using code tags on your first post!

it gives me status error: -14.

What does your research tell you about the meaning of that error status?

Hint: when asking questions on the forum, you need to provide more basic information, such as which libraries you are using, how you have wired things, etc. Since the Uno is a 5V device, and the MPU-9250 is a 3.3V device, did you use level shifters? All described in the "How to" posts at the head of every forum topic.

Hint #2: When using new I2C devices, always use the I2C address scanner to verify communications and to detect which device addresses are present. There are two devices on the MPU-9250 board.