is_front_page is not working in my functions.php

is_front_page() in the below code is not working… this function just doesn’t run when I’m on the front page, any idea why? am I doing something wrong?

function save_landing_page_slider() {              if (isset($  _GET['slider']) && is_front_page()) {                 $  current_user_id = get_current_user_id();                 $  slider = $  _GET['slider'];                 update_field('user_landing_slider', $  slider, 'user_'.$  current_user_id);         }         } add_action('init', 'save_landing_page_slider', 10, 2);