There's been a few major and poorly documented changes in functions and script step for Custom Web Publishing (CWP) in FileMaker Server 16.
CWP no longer has access to Get ( TemporaryPath ) and Get ( DocumentsPath ) and CWP is is no longer able to use Send Mail to send attachments.
These changes were not in release notes and only discovered in a testing environment and following up with the FM 16 help file.
I suspect there may be other changes, but I'm not prepared to read through every function and script step to compare 15 and 16.
Vote here to lobby FMI to fix this: Bring back CWP functionality