I create a snippet called myscripttest:
<?php
$modx->regClientStartupScript('assets/templates/js/myscript.js');
put myscript.js into assets/templates/js, call [myscripttest] from my document. Result: it returns 404 for assets/templates/js/myscript.js. Same after I clear cash.
But if I include default scripts via this snippet, everything works.
EDITED:
Nothing changes when I add a slash:
<?php
$modx->regClientStartupScript('/assets/templates/js/myscript.js');
Please look in the browser console, which url path is used to access the file. Is the file located there? If yes: Is the script file readable by apache/nginx? If not to assign 644 as file permissions.