At the moment I am using the following code so that every time a check box is marked off in a column then the whole row is hidden. At the moment the script I have only works for one column and not for any other column. I would like the script to work for any column I choose. I am using Google Sheets.
function onEdit(e){
if (e.range.columnStart != 6 || e.value != "TRUE") return;
SpreadsheetApp.getActiveSheet().hideRows(e.range.rowStart);
}