I'm just learning GAS and wrote the following for sheets. It is supposed to hide the row when the value in column c is zero. The script will run, but it does nothing to the sheet. What am I missing? BTW, I am planning on using this with an onChange trigger. I just rewrote it this way so that I could test it easily. I really appreciate any input!
function test() {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getSheetByName("Client");
  var range = sheet.getRange("C17:C67");
  var rangeValues = range.getValues();
  
  for (i = 0; i < range.length; i++) {
    if(rangeValues[1][i] == 0){
      sheet.hideRow(i+17);
    }
  }
}
